]> gitweb.factorcode.org Git - factor.git/commitdiff
images.gdiplus: GDI+ "ARGB" is little-endian, so really maps to opengl BGRA
authorJoe Groff <arcata@gmail.com>
Wed, 7 Jul 2010 21:51:16 +0000 (14:51 -0700)
committerJoe Groff <arcata@gmail.com>
Wed, 7 Jul 2010 21:51:16 +0000 (14:51 -0700)
basis/images/gdiplus/gdiplus.factor

index b2c31f383e653b3f0f2ab32629cbed10942585ce..0e9549f892fd46d641d2de0a14d2412d42356a73 100644 (file)
@@ -2,8 +2,8 @@
 USING: accessors alien.c-types alien.data alien.enums\r
 classes.struct destructors images images.loader\r
 io.streams.limited kernel locals math windows.com\r
-windows.gdiplus windows.streams windows.types ;\r
-FROM: images => ARGB ;\r
+windows.gdiplus windows.streams windows.types typed\r
+byte-arrays grouping sequences ;\r
 IN: images.gdiplus\r
 \r
 SINGLETON: gdi+-image\r
@@ -48,7 +48,7 @@ SINGLETON: gdi+-image
     image new\r
         { w h } >>dim\r
         pixels >>bitmap\r
-        ARGB >>component-order\r
+        BGRA >>component-order\r
         ubyte-components >>component-type\r
         f >>upside-down? ;\r
 \r