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: 67)
.tif  4col.tif (Size: 25.86 KB / Downloads: 68)
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
Wink GIMP dialog boxes take forever to load! LugwigVanBacon 1 43 Yesterday 20:08
Last Post: paynekj
  free online Gradient Generator for GIMP and inkscape released on github healingdrawing 1 88 Aug 8, 2018 09:00
Last Post: paynekj
  gimp 2.8.6 very slow to open files millsware 14 3,505 Aug 8, 2018 05:46
Last Post: paynekj
  Can't copy python script to Gimp plugin folder Alan Lacey 1 144 Aug 5, 2018 15:54
Last Post: paynekj
  How to add shininess to car textures in Gimp? sprotz 1 126 Aug 3, 2018 12:48
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS