*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 05 Aug 2009 14:10:38 +0200
changeset 2705 7ff2e44e44af
parent 2704 bbcc771de65c
child 2706 3c2c631f9d16
*** empty log message ***
PNGReader.st
--- a/PNGReader.st	Wed Aug 05 13:49:07 2009 +0200
+++ b/PNGReader.st	Wed Aug 05 14:10:38 2009 +0200
@@ -85,6 +85,15 @@
     MIMETypes defineImageType:'image/x-png'  suffix:'png' reader:self.
 ! !
 
+!PNGReader class methodsFor:'queries'!
+
+canRepresent:anImage
+    "return true, if anImage can be represented in my file format.
+     Any image is supported."
+
+    ^ true
+! !
+
 !PNGReader class methodsFor:'testing'!
 
 isValidImageFile:aFileName
@@ -330,8 +339,14 @@
 processPHYSChunkLen:len
     "physical pixel chunk - currently unhandled"
 
-    'PNGReader: unhandled chunk type: PHYS' infoPrintCR.
-    ^ false
+    |pixelPerUnitX pixelPerUnitY unit|
+
+    pixelPerUnitX := inStream nextLongMSB:true.  
+    pixelPerUnitY := inStream nextLongMSB:true.
+    unit := inStream nextByte.
+
+    'PNGReader: ignored chunk type: PHYS' infoPrintCR.
+    ^ true
 !
 
 processPLTEChunkLen:len
@@ -785,7 +800,7 @@
 !PNGReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.22 2009-08-05 11:49:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.23 2009-08-05 12:10:38 cg Exp $'
 ! !
 
 PNGReader initialize!