You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2010/02/08 08:35:52 UTC

DO NOT REPLY [Bug 48693] New: PNG generated by batik doesn't open in IE7

https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

           Summary: PNG generated by batik doesn't open in IE7
           Product: Batik
           Version: 1.8
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVG Rasterizer
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: jeremy.bethmont@gmail.com


Created an attachment (id=24936)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24936)
Source SVG file

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #5 from Helder Magalhães <he...@gmail.com> 2010-02-08 04:24:37 UTC ---
Created an attachment (id=24941)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24941)
Screenshot IE6, 7 and 8

Screenshot showing IE6, 7 and 8, allowing to see transparency (due to the PNG
being embedded in an HTML page with a red background). As expected, IE6, which
doesn't support PNG transparency, displays a white background.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

jeremy.bethmont@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #8 from jeremy.bethmont@gmail.com 2010-02-09 18:20:07 UTC ---
I wrote a small Python script (attached) that shows the chunks of a PNG file.

Here is the output with a PNG file generated by batik SVN:

chunk IHDR,    length 13,    md5 d2da018c3994bfb3e53315d832aa5c90
chunk cHRM,    length 32,    md5 e4d16d0c3e4564d029f8877a181ff7cb
chunk gAMA,    length 4,    md5 84f9762215ca22a918a8ce4836984145
chunk sRGB,    length 1,    md5 93b885adfe0da089cdf634904fd59f71
chunk bKGD,    length 6,    md5 6aae5f5580123f99090c5338ce4e65ee
chunk pHYs,    length 9,    md5 79488bba00d8eec19f396b1d366073fd
chunk IDAT,    length 2636,    md5 f56e05afda2506561a91e27de88dd3b7
chunk IDAT,    length 0,    md5 d41d8cd98f00b204e9800998ecf8427e
chunk IDAT,    length 0,    md5 d41d8cd98f00b204e9800998ecf8427e
chunk IEND,    length 0,    md5 d41d8cd98f00b204e9800998ecf8427e

And bellow with batik 1.7:

chunk IHDR,    length 13,    md5 d2da018c3994bfb3e53315d832aa5c90
chunk cHRM,    length 32,    md5 e4d16d0c3e4564d029f8877a181ff7cb
chunk gAMA,    length 4,    md5 84f9762215ca22a918a8ce4836984145
chunk sRGB,    length 1,    md5 93b885adfe0da089cdf634904fd59f71
chunk bKGD,    length 6,    md5 6aae5f5580123f99090c5338ce4e65ee
chunk pHYs,    length 9,    md5 79488bba00d8eec19f396b1d366073fd
chunk IDAT,    length 2636,    md5 f56e05afda2506561a91e27de88dd3b7
chunk IEND,    length 0,    md5 d41d8cd98f00b204e9800998ecf8427e

As you can see, the PNG file generated by batik SVN contains 2 empty IDAT
chunks. Otherwise the files are identical (you can check the md5 hashs).
Again, the PNG generated by batik 1.7 displays well on IE7 but not the one
generated by batik SVN.

I believe this is a bug and PNG files shouldn't contain any empty IDAT chunks
so I reopen the ticket.

Best,

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #1 from jeremy.bethmont@gmail.com 2010-02-07 23:37:05 UTC ---
Created an attachment (id=24937)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24937)
PNG output

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Helder Magalhães <he...@gmail.com> 2010-02-08 04:19:12 UTC ---
(In reply to comment #2)
> If you rasterize a SVG file with the latest SVN version of batik. The resulting
> PNG file cannot open in IE7.

Just tested your attached PNG file in IE6 [1], IE7 [2] and IE8 [3] and it
displays as expected, both stand-alone and when embedding in a Web page. IE6
doesn't display PNG transparency, but this is a know browser limitation. Note
that IE7 also has a few PNG transparency bugs, although in this case nothing is
noticed.

You may be interested in taking a look at the rasterizer options [4], namely
"-bg", which allows you to specify a background color to be used in the export
operation. Note that the PNG rasterizer specifically accepts a special key,
KEY_FORCE_TRANSPARENT_WHITE [5], which allows you to perform an additional
special trick which I'm not sure if it's enabled by default.

I'm assuming that either your IE or Windows may not be updated or something may
be interfering (embedding in a Web page along with a JavaScript framework which
is messing things up, for example).

Please reopen if you can further reproduce. ;-)


[1] Internet Explorer 6.0 on Windows XP SP 3
[2] Internet Explorer 7.0.5730.13 on Windows XP SP 3
[3] Internet Explorer 8.0.6001.188882 on Windows Vista SP2
[4] http://xmlgraphics.apache.org/batik/tools/rasterizer.html#using-binary
[5]
http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/transcoder/image/ImageTranscoder.html#KEY_FORCE_TRANSPARENT_WHITE

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #4 from Helder Magalhães <he...@gmail.com> 2010-02-08 04:21:57 UTC ---
Created an attachment (id=24939)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24939)
HTML which embeds the PNG attachment (allows verifying transparency)

One needs to remove the "txt" file extension due to Bugzilla security
restrictions....

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #6 from jeremy.bethmont@gmail.com 2010-02-08 04:36:10 UTC ---
Created an attachment (id=24943)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24943)
Screenshot showing the bug on IE7

Here is a screenshot using the attached HTML file on IE6, 7 and 8.
As you can see the picture seems "broken" on IE7 (Internet Explorer 7.0.5730.13
on Windows XP SP 3)

Please note that if I use Batik 1.7 to generate test.png it displays correctly
on IE7.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #7 from jeremy.bethmont@gmail.com 2010-02-09 18:13:23 UTC ---
Created an attachment (id=24958)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24958)
Script that shows the chunks of a PNG file (depends on pypng)

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #9 from Helder Magalhães <he...@gmail.com> 2010-02-21 15:57:24 UTC ---
(In reply to comment #7)
> Created an attachment (id=24958)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24958) [details]
> Script that shows the chunks of a PNG file (depends on pypng)

Note that running three IE versions in the same OS can lead to weird behavior
such as this one. the only recommended way of doing it [1] is through different
OS installs (see my previous screenshot, where I use two virtual machine for
IE6 and IE7; IE8 is locally available)... ;-)

Apart from the above, which may explain the issue in IE7, we should suppress
those dummy IDAT chunks. The only thing that currently occurs to me is *maybe*
a regression caused by recent modifications (made by Thomas in revision 796596,
see bug 46863 also)... Nevertheless, this is only an hypothesis and I'll try to
clarify it whenever possible. I've also found similar code [2] which can be
used to check for possible improvements to the existing one. :-)


[1]
http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx
[2]
http://dmi.ensica.fr/doc/Java/j2sdk-1_4_2-doc/docs/j2h/com/sun/imageio/plugins/png/PNGImageWriter.java.html

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

Thomas Deweese <de...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #11 from Thomas Deweese <de...@apache.org> 2010-05-21 06:01:31 EDT ---
Fixed in revision 946961.
The IDAT stream should no longer write zero length IDAT secions.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #10 from Jonathan Wood <jo...@gmail.com> 2010-05-19 15:31:46 EDT ---
Created an attachment (id=25457)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25457)
Possible resolution in svn diff format


Tested locally, not fully regression tested

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48693] PNG generated by batik doesn't open in IE7

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48693

--- Comment #2 from jeremy.bethmont@gmail.com 2010-02-07 23:39:36 UTC ---
If you rasterize a SVG file with the latest SVN version of batik. The resulting
PNG file cannot open in IE7.

java -jar batik-rasterizer.jar -m 'image/png' test.svg

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org