Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2009-09-28 16:33:51 -05:00
commit f59b842d9b
1 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@
USING: accessors assocs byte-arrays combinators images
io.encodings.binary io.pathnames io.streams.byte-array
io.streams.limited kernel namespaces splitting strings
unicode.case ;
unicode.case sequences ;
IN: images.loader
ERROR: unknown-image-extension extension ;
@ -33,7 +33,10 @@ GENERIC: stream>image ( stream class -- image )
[ open-image-file ] [ image-class ] bi load-image* ;
M: byte-array load-image*
[ binary <byte-reader> ] dip stream>image ;
[
[ binary <byte-reader> ]
[ length stream-throws <limited-stream> ] bi
] dip stream>image ;
M: limited-stream load-image* stream>image ;