Post Reply 

Indexed color tif - can gimp handle less than 256 colors?

Dec 1, 2011, 04:28
Post: #1
Indexed color tif - can gimp handle less than 256 colors?
To save space on large images, color indexed images should be able to reduce the file size. I'm not sure gimp is handling this correctly.

I have some high resolution drawings which I need to markup some redlines on. They are 1bit (black and white) tif files. If I convert them to full color rgb the file size is nearly 1Gb, so I need to be able to use color indexing to limit the size.
I extracted a small area to quickly test the problem.

What I found is that gimp claims to create a 3 color index file, but when I reopen the file, gimp then reports it as 256 color!

If you want to try this, I've attached the file and the steps are detailed below.

Is this a problem that has been fixed in later versions (I am using gimp2.6), or is this a known problem/limitation? I've tried this in Ubuntu 10.04LTS and Windows XP with the same result.

If anyone has any ideas what is going on I would be gratefull for any info.

------------------------------------------
The original image is original.tif - a (1 bit grayscale) image.
(15.1kb)

With Gimp, this was converted to rgb 'mode' (Image-Mode-RGB)
Saved this as rgb.tif

I then Drew a red line on it (to add a 3rd color), then converted the image to indexed, with max 4 colors. (Image->Mode->Indexed->Generate optimum palette, Max numb of colors:4)

The colormap (Dialog-Colormap) showed just 3 colors. Image properties (Alt-Enter) also shows the colorspace as expected as 3 colors (black, white and red).
Saved the file as 4col.tif

However, when I close and reopen the same file, the colormap and image properties now show 256 colors!

(Lzw compression was used each time the tif was saved)


Attached File(s)
.tif  original.tif (Size: 15.14 KB / Downloads: 72)
.tif  4col.tif (Size: 25.86 KB / Downloads: 73)
Find all posts by this user
Quote this message in a reply
Dec 1, 2011, 17:14
Post: #2
RE: Indexed color tif - can gimp handle less than 256 colors?
Thanks ofnuts. That explains what's happening. Based on that, I'll swith to using png for the modified files. Thanks for the quick response.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparency not showing in gimp ofey 1 241 Feb 4, 2019 09:57
Last Post: paynekj
  Gimp and Python development ffrree 1 318 Jan 16, 2019 10:05
Last Post: paynekj
  GIMP saving the transparency checkerboard in image SlyCooperReloadCoded 1 434 Jan 9, 2019 08:56
Last Post: paynekj
  GIMP Slow Open browsing folger euro_rapp 1 309 Jan 7, 2019 09:39
Last Post: paynekj
  Gimp craashes in LM 19.1 Yumi 1 248 Jan 7, 2019 09:39
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS