mirror of https://github.com/GNOME/gimp.git
plug-ins: fix not converting 8 bps grayscale MINISWHITE TIFF
We only set tiff_mode for images with bps < 8, but we also use it for 8 bps grayscale images to detect if MINISWHITE needs to be converted. So, let's always set tiff_mode for PALETTE, MINISBLACK and MINISWHITE.
This commit is contained in:
parent
94de89febf
commit
2e4b9bcba7
|
@ -821,15 +821,17 @@ load_image (GFile *file,
|
|||
case PHOTOMETRIC_PALETTE:
|
||||
case PHOTOMETRIC_MINISBLACK:
|
||||
case PHOTOMETRIC_MINISWHITE:
|
||||
/* Even for bps >= we may need to use tiff_mode, so always set it.
|
||||
* Currently we use it to detect the need to convert 8 bps miniswhite. */
|
||||
if (photomet == PHOTOMETRIC_PALETTE)
|
||||
tiff_mode = GIMP_TIFF_INDEXED;
|
||||
else if (photomet == PHOTOMETRIC_MINISBLACK)
|
||||
tiff_mode = GIMP_TIFF_GRAY;
|
||||
else if (photomet == PHOTOMETRIC_MINISWHITE)
|
||||
tiff_mode = GIMP_TIFF_GRAY_MINISWHITE;
|
||||
|
||||
if (bps < 8)
|
||||
{
|
||||
if (photomet == PHOTOMETRIC_PALETTE)
|
||||
tiff_mode = GIMP_TIFF_INDEXED;
|
||||
else if (photomet == PHOTOMETRIC_MINISBLACK)
|
||||
tiff_mode = GIMP_TIFF_GRAY;
|
||||
else if (photomet == PHOTOMETRIC_MINISWHITE)
|
||||
tiff_mode = GIMP_TIFF_GRAY_MINISWHITE;
|
||||
|
||||
/* FIXME: It should be a user choice whether this should be
|
||||
* interpreted as indexed or grayscale. For now we will
|
||||
* use indexed (see issue #6766). */
|
||||
|
|
Loading…
Reference in New Issue