GNOME Bugzilla – Bug 577301
Dithering with transparency is broken for "positioned" method
Last modified: 2009-07-20 20:50:47 UTC
Please describe the problem: When an image with an alpha channel is converted to indexed using the "positioned" method and "enable dithering of transparency" checked, the result is wrong. Steps to reproduce: 1. Create a new image, solid white. 2. Paint anything in it. 3. Add an alpha channel to the background layer. 4. Image>Mode>Indexed, using "positioned" method and "enable dithering of transparency" checked. Actual results: The resultant image is mostly transparent. Expected results: There should be no transparency, or of there was in the source, there should be properly dithered transparency. The other dither modes work correctly. Does this happen every time? Yes. Other information:
Created attachment 131713 [details] [review] Fixes the reported bug. I am unsure why the original code was doing the bit-shifting. Could have been some legacy dithering stuff.
Hope I did this correctly.
I think this is a duplicate of bug #349882 So, if this patch works fully and gets committed, that should also be closed. Details on exactly what is a correct result are also found in bug #349882.
Created attachment 131739 [details] Test case with patch Attached is the result of testing the patch against a crop of the provided image. While not 100% identical to the provided expected outcome it is very close. The patch currently uses the same dither matrix for the alpha and colour dithering.
Hi! The patch does not apply cleanly on GNOME master any longer. Could you update that, and also submit the patch in the form of a git commit? That makes it into minimal work for maintainers to commit the fix. Use this command to generate the patch: git format-patch origin/master..master
A bug should not remain unconfirmed if we are actually discussing the attached patch :)
(In reply to comment #5) > Hi! The patch does not apply cleanly on GNOME master any longer. Could you > update that, and also submit the patch in the form of a git commit? That makes > it into minimal work for maintainers to commit the fix. > > Use this command to generate the patch: > git format-patch origin/master..master > Unfortunately, I can't. I am a windows user only, and am working off the minGW/Msys build. Sorry. I couldn't even get svn working for me, so have never even considered trying git. I was trying to be helpful by providing the diff. If diff's are not an acceptable way of providing patches, I'm not sure what more I can really do. -Rob A>
FWIW, git is available in Cygwin. There are also standalone packages for windows here (I've never tried them): http://code.google.com/p/msysgit/downloads/list Chris
Don't get me wrong, patches are always welcomed, but as a maintainer you want things to be as smooth as possible so that you can manage as many patches as possible.
As simple as the patch is, we should be able to merge it. Setting milestone to 2.6 so that is not forgotten.
This went into the master branch as commit cbfe411ea15a4dcc6d919123022ed37bcd951b60. We can merge it to the gimp-2-6 branch as soon as it has been tested.
Cherry-picking failed on this one, but I've now merged the change manually. Closing as FIXED.