Post Reply 

changes colour when switching to index mode

Oct 28, 2011, 23:23 (This post was last modified: Oct 28, 2011 23:53 by sneakySteve.)
Post: #1
changes colour when switching to index mode
Hi,

i have been using indexed mode to save 8-bit png files for the web, just as one would through the Save For Web interface in photoshop. sometimes it works brilliantly, usually when very few colours. but sometimes it changes some of the most dominant colours in the image. for example, if i make an image with background in #f3f3f3, two antialiased type layers in different colours, flatten the image and switch to indexed mode the background will change to something like f3f201 or whatever depending on the colours of the type layers (even if i choose 256 colours...). i have searched for this for a while now, but cant seem to find anyone with the same problem. anyone experience anything similar? this is kind of important, its a hassle sitting going through the colour map to change the necessary colours.

thanks

EDIT: ok those exact instructions didnt actually replicate the problem this time that i tried it, but nonetheless the problem exists. if noone recognises it i will save the file it occurs to next time so you can all replicate the problem.

EDIT 2: happened immediately. i have attached a png of the file, even if you set it to 256 colours, switching to indexed mode will change the white background to #fefffc. once again, one could go into the colour map and change it back to pure white, but to be completely correct one needs to change every colour in the shadows (and antialiasing) that fade into the white, which will also have been offset by the switch to indexed mode.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 00:04
Post: #2
RE: changes colour when switching to index mode
Indeed. And the strange part is that if your use Colors/Posterize to reduce the image to 256 colors (but sill RGB) the white remains white. So one possible solution would be to genrate a palette from that, and force the use of that palette when going to indexed mode.

Now, seriously, why are you using the indexed mode with PNG?

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 00:06 (This post was last modified: Oct 29, 2011 00:13 by sneakySteve.)
Post: #3
RE: changes colour when switching to index mode
(Oct 29, 2011 00:04)ofnuts Wrote:  Indeed. And the strange part is that if your use Colors/Posterize to reduce the image to 256 colors (but sill RGB) the white remains white. So one possible solution would be to genrate a palette from that, and force the use of that palette when going to indexed mode.

Hmmm that is very weird indeed... i posterised the image with 70 levels, which should mean there are only 70 colours. then switching to indexed mode with 255 colours still offsets the white.

EDIT: nevermind, late night thinking. 70 level posterise obviously generates a plethora of colours. setting to around 13 levels, then switching to indexed mode actually works. so thats a work around, thanks! but i do wish the switch to indexed mode was better...

(Oct 29, 2011 00:04)ofnuts Wrote:  Now, seriously, why are you using the indexed mode with PNG?

merely to squeeze the last kb out of the file when i dont need the alpha transparency... is this wrong thinking?
Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 00:50
Post: #4
RE: changes colour when switching to index mode
(Oct 29, 2011 00:06)sneakySteve Wrote:  
(Oct 29, 2011 00:04)ofnuts Wrote:  Now, seriously, why are you using the indexed mode with PNG?
merely to squeeze the last kb out of the file when i dont need the alpha transparency... is this wrong thinking?
Who cares about the last KB (or even the last 10) these days?

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 15:46
Post: #5
RE: changes colour when switching to index mode
(Oct 29, 2011 00:50)ofnuts Wrote:  Who cares about the last KB (or even the last 10) these days?

People building websites with very large numbers of visits. halfing the size of all your images almost halfs the load on the server. every kb counts. even these days.
Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 17:42 (This post was last modified: Oct 29, 2011 17:43 by ofnuts.)
Post: #6
RE: changes colour when switching to index mode
The KB count isn't in the images... bloated HTML and Javascript account for most of the traffic these days. Some figures:
Code:
gimpforums:
HTML:    188
CSS:     52
JS:      632
IMG:     192
Total:   1120

Amazon:
HTML:    392
CSS:     152
JS:      328
IMG:     156
Total:   1144

Huffington Post:
HTML:    716
CSS:     708
JS:      1076
IMG:     860
Total:   4608

Google:
HTML:    52
CSS:     0
JS:      360
IMG:     32
Total:   444

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 29, 2011, 21:29
Post: #7
RE: changes colour when switching to index mode
(Oct 29, 2011 17:42)ofnuts Wrote:  The KB count isn't in the images... bloated HTML and Javascript account for most of the traffic these days. Some figures:

Nice, those were some interesting figures, thanks! Though perhaps not super relevant as they are not very graphic-intense websites. nonetheless i agree with you completely, though i think optimiziation and the hunt for KB should not stop at the code. if your pictures uses very little colours, i reckon its silly not to make it indexed. but that is my opinion... every little counts.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Two 'halves' colour correction Supermandan1 3 246 Oct 10, 2014 12:05
Last Post: iForStyle007
  Calling 3rd party plugin for batch mode INV_SIG 3 233 Sep 24, 2014 09:09
Last Post: rich2005
  Colour balance is broken in 2.8? snowjoke 1 236 Sep 4, 2014 00:11
Last Post: snowjoke
  Issue with Layers and Lighten only mode pgodfrin 14 824 Jul 5, 2014 22:09
Last Post: pgodfrin
  Changing hair colour in GIMP Neiiley 1 361 Jun 25, 2014 16:39
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS