images.p[bgp]m: use throws-on-eof
parent
90b962bbd3
commit
8b7cb0bc21
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors arrays ascii bit-arrays byte-arrays combinators
|
USING: accessors arrays ascii bit-arrays byte-arrays combinators
|
||||||
continuations grouping images images.loader io io.encodings.ascii
|
continuations grouping images images.loader io io.encodings.ascii
|
||||||
io.encodings.string kernel locals make math math.functions math.parser
|
io.encodings.string kernel locals make math math.functions math.parser
|
||||||
sequences ;
|
sequences io.streams.throwing ;
|
||||||
IN: images.pbm
|
IN: images.pbm
|
||||||
|
|
||||||
SINGLETON: pbm-image
|
SINGLETON: pbm-image
|
||||||
|
@ -73,7 +73,7 @@ SINGLETON: pbm-image
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: pbm-image stream>image
|
M: pbm-image stream>image
|
||||||
drop [ read-pbm ] with-input-stream ;
|
drop [ [ read-pbm ] input-throws-on-eof ] with-input-stream ;
|
||||||
|
|
||||||
M: pbm-image image>stream
|
M: pbm-image image>stream
|
||||||
drop {
|
drop {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.c-types ascii combinators images images.loader
|
USING: accessors alien.c-types ascii combinators images images.loader
|
||||||
io io.encodings.ascii io.encodings.string kernel locals make math
|
io io.encodings.ascii io.encodings.string kernel locals make math
|
||||||
math.parser sequences specialized-arrays ;
|
math.parser sequences specialized-arrays io.streams.throwing ;
|
||||||
SPECIALIZED-ARRAY: ushort
|
SPECIALIZED-ARRAY: ushort
|
||||||
IN: images.pgm
|
IN: images.pgm
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ SINGLETON: pgm-image
|
||||||
wide [ ushort-components ] [ ubyte-components ] if >>component-type ;
|
wide [ ushort-components ] [ ubyte-components ] if >>component-type ;
|
||||||
|
|
||||||
M: pgm-image stream>image
|
M: pgm-image stream>image
|
||||||
drop [ read-pgm ] with-input-stream ;
|
drop [ [ read-pgm ] input-throws-on-eof ] with-input-stream ;
|
||||||
|
|
||||||
M: pgm-image image>stream
|
M: pgm-image image>stream
|
||||||
drop {
|
drop {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors ascii combinators images images.loader io
|
USING: accessors ascii combinators images images.loader io
|
||||||
io.encodings.ascii io.encodings.string kernel locals make math
|
io.encodings.ascii io.encodings.string kernel locals make math
|
||||||
math.parser sequences ;
|
math.parser sequences io.streams.throwing ;
|
||||||
IN: images.ppm
|
IN: images.ppm
|
||||||
|
|
||||||
SINGLETON: ppm-image
|
SINGLETON: ppm-image
|
||||||
|
@ -47,7 +47,7 @@ SINGLETON: ppm-image
|
||||||
ubyte-components >>component-type ;
|
ubyte-components >>component-type ;
|
||||||
|
|
||||||
M: ppm-image stream>image
|
M: ppm-image stream>image
|
||||||
drop [ read-ppm ] with-input-stream ;
|
drop [ [ read-ppm ] input-throws-on-eof ] with-input-stream ;
|
||||||
|
|
||||||
M: ppm-image image>stream
|
M: ppm-image image>stream
|
||||||
drop {
|
drop {
|
||||||
|
|
Loading…
Reference in New Issue