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: 60)
.tif  4col.tif (Size: 25.86 KB / Downloads: 60)
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
  Changing names on things in Gimp? colorizing 1 102 Feb 17, 2018 04:34
Last Post: ythgilb
Question Gimp 2.8 vs 2.9 performance dr_Fell 2 109 Feb 16, 2018 15:27
Last Post: dr_Fell
  Gimp 2.8.22 in Windows 10: Filename issue Mona Eberhardt 3 147 Jan 28, 2018 21:16
Last Post: ythgilb
  GiMP 2.8.10 freezes on 'Opening '[filename]' Rasha 0 101 Jan 24, 2018 00:00
Last Post: Rasha
  What is the best font and color combination to write on this? SonAmyFan362 2 83 Jan 23, 2018 16:17
Last Post: SonAmyFan362

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS