From 3cf4c6fee20e5a36088a16a155e2f648e6d092ff Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 13 Feb 2009 15:56:22 -0600 Subject: [PATCH] support 48bpp tiffs --- basis/images/images.factor | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/basis/images/images.factor b/basis/images/images.factor index 11452aa7d2..32fbc54978 100644 --- a/basis/images/images.factor +++ b/basis/images/images.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: kernel accessors grouping sequences combinators -math specialized-arrays.direct.uint byte-arrays ; +math specialized-arrays.direct.uint byte-arrays +specialized-arrays.direct.ushort ; IN: images SINGLETONS: BGR RGB BGRA RGBA ABGR ARGB RGBX XRGB BGRX XBGR @@ -28,6 +29,13 @@ GENERIC: load-image* ( path tuple -- image ) >byte-array add-dummy-alpha ] change-bitmap ] } + { R16G16B16 [ + [ + dup length 2 / + [ -8 shift ] map + >byte-array add-dummy-alpha + ] change-bitmap + ] } { BGRA [ [ 4 dup [ [ 0 3 ] dip reverse-here ] each