]> gitweb.factorcode.org Git - factor.git/commitdiff
fix byte swapping on greyscale-alpha
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 9 Oct 2009 01:37:00 +0000 (20:37 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 9 Oct 2009 01:37:00 +0000 (20:37 -0500)
basis/images/png/png.factor

index c41a1956cdbe384756a57154bdef41c97455db27..595bb62ed4d3f1a62326d2d90accaa07fc6ed995 100755 (executable)
@@ -215,7 +215,7 @@ ERROR: invalid-color-type/bit-depth loading-png ;
 
 : decode-greyscale-alpha ( loading-image -- byte-array' )
     [ raw-bytes ] [ bit-depth>> ] bi 16 = [
-        3 group [ first3 swapd 3array ] map B{ } concat-as
+        4 group [ first4 [ swap ] 2dip 4array ] map B{ } concat-as
     ] when ;
 
 : loading-png>bitmap ( loading-png -- bytes component-order )