xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lberna...@apache.org
Subject svn commit: r1448479 - in /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image: codec/tiff/ExtraSamplesType.java loader/impl/imageio/ImageLoaderImageIO.java writer/ImageWriterParams.java writer/ResolutionUnit.java
Date Thu, 21 Feb 2013 00:24:08 GMT
Author: lbernardo
Date: Thu Feb 21 00:24:08 2013
New Revision: 1448479

URL: http://svn.apache.org/r1448479
Log:
FOP-218: Use event producer when Colour Profile in PNG Image is bad; patch submitted by Simon
Steiner

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/ExtraSamplesType.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterParams.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ResolutionUnit.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/ExtraSamplesType.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/ExtraSamplesType.java?rev=1448479&r1=1448478&r2=1448479&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/ExtraSamplesType.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/ExtraSamplesType.java
Thu Feb 21 00:24:08 2013
@@ -40,4 +40,4 @@ enum ExtraSamplesType {
     int getValue() {
         return typeValue;
     }
-}
\ No newline at end of file
+}

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java?rev=1448479&r1=1448478&r2=1448479&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
Thu Feb 21 00:24:08 2013
@@ -203,11 +203,16 @@ public class ImageLoaderImageIO extends 
                         imageData = bi;
                         cm = cm2;
                     } catch (IllegalArgumentException iae) {
-                        log.warn("Image " + info.getOriginalURI()
+                        String msg = "Image " + info.getOriginalURI()
                                 + " has an incompatible color profile."
                                 + " The color profile will be ignored."
                                 + "\nColor model of loaded bitmap: " + cm
-                                + "\nColor model of color profile: " + cm2);
+                                + "\nColor model of color profile: " + cm2;
+                        if (info.getCustomObjects().get("warningincustomobject") != null)
{
+                            info.getCustomObjects().put("warning", msg);
+                        } else {
+                            log.warn(msg);
+                        }
                     }
                 }
             }

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterParams.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterParams.java?rev=1448479&r1=1448478&r2=1448479&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterParams.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterParams.java
Thu Feb 21 00:24:08 2013
@@ -211,4 +211,4 @@ public class ImageWriterParams {
         this.endianness = endianness;
     }
 
-}
\ No newline at end of file
+}

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ResolutionUnit.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ResolutionUnit.java?rev=1448479&r1=1448478&r2=1448479&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ResolutionUnit.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ResolutionUnit.java
Thu Feb 21 00:24:08 2013
@@ -80,4 +80,4 @@ public enum ResolutionUnit {
     public static ResolutionUnit get(int value) {
          return LOOKUP.get(value);
     }
-}
\ No newline at end of file
+}



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


Mime
View raw message