You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/04/03 07:22:23 UTC

DO NOT REPLY [Bug 42028] New: - Incorrect rendering of GIF images

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42028

           Summary: Incorrect rendering of GIF images
           Product: Fop
           Version: all
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: images
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: trejkaz@trypticon.org


Attached zip file contains an example with a single GIF, which exhibits two
problems:
  1. the GIF is scaled in a strange fashion, and 
  2. the black lines are lost.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42028] - Incorrect rendering of GIF images

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42028





------- Additional Comments From trejkaz@trypticon.org  2007-04-02 22:39 -------
Created an attachment (id=19897)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19897&action=view)
Proposed patch

Attached patch uses the ImageIO metadata DOM to obtain the width and height, as
well as the horizontal and vertical pixel offset.  When building the bitmap
array, offsets the stored image pixels.

I'm not sure how to solve problem #2 though.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42028] - Incorrect rendering of GIF images

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42028





------- Additional Comments From trejkaz@trypticon.org  2007-04-03 00:06 -------
Some investigation of #2, inside ImageIOImage#loadBitmap:

alphas = { 0, 255, 255, 255 }
reds   = { 0,   0, 187,   1 }
greens = { 0,   0, 224,   2 }
blues  = { 0,   0, 227,   3 }

The first palette colour is the transparent colour, which is black.  The second
colour, which is *not* transparent, also happens to be black.

FOP assumes that the transparent colour doesn't occur anywhere in the image, yet
in this situation it does.

Maybe it would be possible to pick an RGB combo which doesn't exist in the
image, recolour all the transparent pixels to that colour and then set that as
the transparentColor field.  That way it wouldn't clash with real drawn pixels
which happened to have the same colour.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42028] - Incorrect rendering of GIF images

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42028





------- Additional Comments From trejkaz@trypticon.org  2007-04-02 22:22 -------
Created an attachment (id=19896)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19896&action=view)
gif-scaling-bug.zip


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42028] - Incorrect rendering of GIF images

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42028





------- Additional Comments From trejkaz@trypticon.org  2007-04-02 22:23 -------
I may have a fix for #1 -- ImageIOImage was using the image data array to
determine the image size, which isn't necessarily the case for GIF.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.