SGladys / mediacomp-jes

Automatically exported from code.google.com/p/mediacomp-jes
0 stars 0 forks source link

Incorrect colors being written back into gifs #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load a gif image
2. select a pixel with getPixel and change its color
3. select the same pixel with getPixel and check its color

What is the expected output? What do you see instead?

I would that the color at the pixel location would be the color I set on the 
pixel. While the color values have changed, they are not the values that I set. 
Here is the transcript of a sample session:

>>> picture = makePicture(pickAFile())                         # loading a gif
>>> pixel = getPixel(picture, 10, 10)
>>> print pixel
Pixel red=141 green=141 blue=137
>>> setRed(pixel, 0)
>>> print pixel                                                             # 
the pixel at (10,10) now has red turned off
Pixel red=0 green=141 blue=137
>>> pixel2 = getPixel(picture, 10, 10)                         # fetch pixel 
(10,10) again
>>> print pixel2                                                          # the 
color values are all incorrect
Pixel red=82 green=98 blue=108

What version of the product are you using? On what operating system?
I am using version 4.3 on a Mac running OSX 10.6.8.

Please provide any additional information below.
This only seems to be the case for gifs. I though I was losing my mind until I 
realized I had been using a gif instead of the jpgs I had used for all of my 
earlier tinkering. I converted the image to a jpg and tried again, and got the 
correct result. Looking at the implementation, I suspect it may be a java bug, 
but still worth knowing about.

Original issue reported on code.google.com by christop...@gmail.com on 16 Aug 2012 at 7:01