]> gitweb.factorcode.org Git - factor.git/commitdiff
handle RGBA pngs (when inflate finally works)
authorJoe Groff <arcata@gmail.com>
Sun, 23 Aug 2009 14:51:12 +0000 (09:51 -0500)
committerJoe Groff <arcata@gmail.com>
Sun, 23 Aug 2009 14:51:12 +0000 (09:51 -0500)
basis/images/png/png.factor

index 2469a6a72cee023fa0e5ac8fe22aa46888a59d98..86247351c92fab7b1fb033a0dc8dc55566e7914c 100755 (executable)
@@ -95,7 +95,11 @@ ERROR: unimplemented-color-type image ;
     unimplemented-color-type ;
 
 : decode-truecolor-alpha ( loading-png -- loading-png )
-    unimplemented-color-type ;
+    [ <image> ] dip {
+        [ png-image-bytes >>bitmap ]
+        [ [ width>> ] [ height>> ] bi 2array >>dim ]
+        [ drop RGBA >>component-order ubyte-components >>component-type ]
+    } cleave ;
 
 : decode-png ( loading-png -- loading-png ) 
     dup color-type>> {