Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5106550
Votes 0
Synopsis PNG writer merge standard metadata fails for TextEntry sans #IMPLIED attributes
Category java:imageio
Reported Against 1.4.2_04 , tiger-beta2
Release Fixed 7(b54)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 24-SEP-2004
Description
PNG writer merge standard metadata fails for TextEntry sans #IMPLIED attributes.
Work Around
N/A
Evaluation
This fix was submitted by Martin von Gagern (  xxxxx@xxxxx  )

 The essence of changes is to use more flexible variant of the getAttribute()
 method for optional attributes (keyword, language, and compression), which
 does not rise an IIOInvalidTreeException if optional attribute is messed.

 The default values for optional attributes are used according to PNG spec.

 Validity check for keyword values was also introduced: the length and
 content of keyword attributes should accod with PNG spec
 (http://www.w3.org/TR/PNG/#11keywords).
 
 If attribute keyword is missed or has incorrect or empty value,
 corresponding TextEntry is ignored, because such TextEntry does not fit
 to PNG spec requirements.
 
 Unfortunately, at the moment we have no machinery to deliver
 warnings and non-critical errors related to the metadata processing
 to user: the methadata object may have no connection to any reader
 or writer object and there is no listeners specific to metadata.
Posted Date : 2008-12-12 14:17:53.0
Comments
  
  Include a link with my name & email   

Submitted On 25-OCT-2008
gagern
Not only #IMPLIED attributes; missing compression causes this error as well, although it should default to "none" according to the javax_imageio_1.0 DTD.

"keyword" seems to be really required for PNG, as http://www.w3.org/TR/PNG/#11tEXt mentions a length of at least 1, and http://www.w3.org/TR/PNG/#11keywords gives a list of possible keywords. One might assume some default, but I'm not sure that would be appropriate. Note that the javax_imageio_png_1.0 DTD has keyword as #REQIRED as well. One might also simply ignore nodes without a keyword, without throwing an exception.

I wrote a patch, which leaves "keyword" as required, and submitted it to  jdk7-dev@openjdk.java.net where it's currently pending approval, as I'm not a list member.



PLEASE NOTE: JDK6 is formerly known as Project Mustang