--- 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!