mirror of https://github.com/GNOME/gimp.git
plug-ins: in file-psd, use normal channel order
For some reason we reverse the channel order when loading/saving a PSD file. This doesn't seem to be necessary, and leads to a reversed channel order across GIMP/Photoshop. Simply use the normal channel order instead.
This commit is contained in:
parent
281188e169
commit
2d4de85fe3
|
@ -2098,7 +2098,7 @@ add_merged_image (GimpImage *image,
|
|||
channel = gimp_channel_new (image, alpha_name,
|
||||
chn_a[cidx].columns, chn_a[cidx].rows,
|
||||
alpha_opacity, &alpha_rgb);
|
||||
gimp_image_insert_channel (image, channel, NULL, 0);
|
||||
gimp_image_insert_channel (image, channel, NULL, i);
|
||||
g_free (alpha_name);
|
||||
buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
|
||||
if (alpha_id)
|
||||
|
|
|
@ -680,7 +680,7 @@ save_resources (FILE *fd,
|
|||
if (gimp_drawable_has_alpha (GIMP_DRAWABLE (PSDImageData.merged_layer)))
|
||||
write_string (fd, "Transparency", "channel name");
|
||||
|
||||
for (iter = g_list_last (PSDImageData.lChannels); iter; iter = iter->prev)
|
||||
for (iter = PSDImageData.lChannels; iter; iter = g_list_next (iter))
|
||||
{
|
||||
char *chName = gimp_item_get_name (iter->data);
|
||||
write_string (fd, chName, "channel name");
|
||||
|
@ -743,7 +743,7 @@ save_resources (FILE *fd,
|
|||
write_gchar (fd, 1, "channel mode");
|
||||
}
|
||||
|
||||
for (iter = g_list_last (PSDImageData.lChannels); iter; iter = iter->prev)
|
||||
for (iter = PSDImageData.lChannels; iter; iter = g_list_next (iter))
|
||||
{
|
||||
GimpChannel *channel = iter->data;
|
||||
GimpRGB color;
|
||||
|
@ -1583,7 +1583,7 @@ save_data (FILE *fd,
|
|||
chan = nChansLayer (PSDImageData.baseType,
|
||||
gimp_drawable_has_alpha (GIMP_DRAWABLE (PSDImageData.merged_layer)), 0);
|
||||
|
||||
for (iter = g_list_last (PSDImageData.lChannels), i = PSDImageData.nChannels - 1; iter; iter = iter->prev, i--)
|
||||
for (iter = PSDImageData.lChannels; iter; iter = g_list_next (iter))
|
||||
{
|
||||
IFDBG printf ("\t\tWriting compressed channel data for channel %d\n",
|
||||
i);
|
||||
|
|
Loading…
Reference in New Issue