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: 57)
.tif  4col.tif (Size: 25.86 KB / Downloads: 55)
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
  black square in the gimp's gimp Elimelech 1 53 Dec 9, 2017 12:26
Last Post: ythgilb
  Notice to Gimp Devolopers Palladini 1 118 Dec 1, 2017 05:41
Last Post: paynekj
  silver color pamopar 2 3,975 Nov 22, 2017 06:01
Last Post: georgemacin
  Scaling GIMP for high definition monitors kerry 1 142 Nov 18, 2017 15:01
Last Post: paynekj
  GIMP on High Sierra won't open rickyleaks 1 160 Nov 9, 2017 12:45
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS