Background color bug with indexed colors

Post Reply
andi.k
Posts: 4
Joined: Mon Jan 05, 2009 8:18 pm

Background color bug with indexed colors

Post by andi.k »

I have several versions of PhotoImpact (7, XL and 12) and all of them suffer from a bug when exporting to GIF / PNG with indexed colors.

I run into this when scanning text documents, say DIN A4 letters at 300dpi. Before exporting to PNG or GIF, I use the Gradient tool to maximize contrast.

The image is 8bit RGB at this point and contains only black or colored text on white background.

Now, I try to export to GIF or PNG with 8..64 indexed colors via Image optimizer, but PI occasionally changes the background from white to light pink / light blue or some other bright color and PI 12 sometimes even makes the black text or the white background transparent.

Now, I find myself fiddling with the palette - adding a (255,255,255)-white helps returning the background to white. But the transparent text can not be fixed - there is no mask defined for the image. Setting a mask color and removing it doesn't help.

PI even crashed after I played with the Image optimizer options.

To reproduce this issue, just create a DIN A4 300dpi RGB image (2480x3508 pixels) with white background and use the text tool to enter some black text.

Now, use image optimizer to generate an indexed PNG image with 8 colors. The white background will turn to gray (PI XL) or get transparent (PI 12)!!!

This also happens when converting the image to indexed colors with optimized palette.

I tried this with GIMP and other imaging tools - no problem here!

Has anyone run into this before?

Any workarounds / bugfixes available?
User avatar
Ron P.
Advisor
Posts: 12002
Joined: Tue May 10, 2005 12:45 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Hewlett-Packard 2AF3 1.0
processor: 3.40 gigahertz Intel Core i7-4770
ram: 16GB
Video Card: NVIDIA GeForce GTX 645
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 4TB
Monitor/Display Make & Model: 1-HP 27" IPS, 1-Sanyo 21" TV/Monitor
Corel programs: VS5,8.9,10-X5,PSP9-X8,CDGS-9,X4,Painter
Location: Kansas, USA

Post by Ron P. »

Welcome to the forums,

I don't find the problem. However on the Mask Options tab, I selected Matte, and used white. The other settings I used were:
  • Colors: 8
  • Weight: Even
  • Palette: Optimized
  • Soft: None
  • File Type: Indexed
  • Filter: None
  • Dither & Interlaced left unchecked
The page remained white (255,255,255), and the text was black and crisp..
Ron Petersen, Web Board Administrator
andi.k
Posts: 4
Joined: Mon Jan 05, 2009 8:18 pm

Post by andi.k »

Thanks for the hint with "Matte" - seems to work around the transparency issue.

But: How big was your image?

I tried it with 640x480 pixels - no prob, but with 2480x3508 white still turns to gray.
User avatar
Ron P.
Advisor
Posts: 12002
Joined: Tue May 10, 2005 12:45 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Hewlett-Packard 2AF3 1.0
processor: 3.40 gigahertz Intel Core i7-4770
ram: 16GB
Video Card: NVIDIA GeForce GTX 645
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 4TB
Monitor/Display Make & Model: 1-HP 27" IPS, 1-Sanyo 21" TV/Monitor
Corel programs: VS5,8.9,10-X5,PSP9-X8,CDGS-9,X4,Painter
Location: Kansas, USA

Post by Ron P. »

The same dimensions that you specified...
Ron Petersen, Web Board Administrator
andi.k
Posts: 4
Joined: Mon Jan 05, 2009 8:18 pm

Post by andi.k »

Probably, your text was not anti-aliased...

When I disable anti-aliasing for the text tool such that the text is only plain black with no gray tones, I can reduce to 8 colors without probs for the image contains only 2 colors in total ;)

But with anti-aliasing enabled, I definitely run into trouble!

Anyone else?
andi.k
Posts: 4
Joined: Mon Jan 05, 2009 8:18 pm

Post by andi.k »

Could anyone please verify this with anti-aliasing enabled?
Post Reply