From 556adeb9b4b15e6fe6941a9189ad89f982436817 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 23 Aug 2009 09:51:12 -0500 Subject: [PATCH] handle RGBA pngs (when inflate finally works) --- basis/images/png/png.factor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/basis/images/png/png.factor b/basis/images/png/png.factor index 2469a6a72c..86247351c9 100755 --- a/basis/images/png/png.factor +++ b/basis/images/png/png.factor @@ -95,7 +95,11 @@ ERROR: unimplemented-color-type image ; unimplemented-color-type ; : decode-truecolor-alpha ( loading-png -- loading-png ) - unimplemented-color-type ; + [ ] 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>> {