images.gif: renamed loading-gif>image to gif>image to match the TIFF vocab

db4
Keith Lazuka 2009-09-26 13:15:58 -04:00
parent c1fbca1509
commit 474ecac48f
2 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ IN: images.gif.tests
gif-example1 gif-example2 gif-example3 gif-example4 gif-example5 gif-example1 gif-example2 gif-example3 gif-example4 gif-example5
gif-example6 gif-example6
} }
[ execute( -- gif ) loading-gif>image image. ] each ; [ execute( -- gif ) gif>image image. ] each ;
: declared-num-colors ( gif -- n ) flags>> 3 bits 1 + 2^ ; : declared-num-colors ( gif -- n ) flags>> 3 bits 1 + 2^ ;
: actual-num-colors ( gif -- n ) global-color-table>> length ; : actual-num-colors ( gif -- n ) global-color-table>> length ;
@ -71,7 +71,7 @@ IN: images.gif.tests
0 0 0 255 255 255 255 255 0 0 0 255 0 0 0 255 255 255 255 255 0 0 0 255 0 0 0 255 255 255 255 255 0 0 0 255 0 0 0 255 255 255 255 255 0 0 0 255
0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255
} }
] [ gif-example3 loading-gif>image bitmap>> ] unit-test ] [ gif-example3 gif>image bitmap>> ] unit-test
[ [
BV{ BV{
@ -85,7 +85,7 @@ IN: images.gif.tests
255 000 000 255 000 000 000 000 255 000 000 255 000 000 000 000
000 000 000 000 255 000 000 255 000 000 000 000 255 000 000 255
} }
] [ gif-example5 loading-gif>image bitmap>> ] unit-test ] [ gif-example5 gif>image bitmap>> ] unit-test
[ 100 ] [ gif-example1 >index-stream length ] unit-test [ 100 ] [ gif-example1 >index-stream length ] unit-test
[ 870 ] [ gif-example2 >index-stream length ] unit-test [ 870 ] [ gif-example2 >index-stream length ] unit-test

View File

@ -243,7 +243,7 @@ ERROR: unhandled-data byte ;
[ graphic-control-extensions>> first transparent-color-index>> ] [ graphic-control-extensions>> first transparent-color-index>> ]
[ drop f ] if ; [ drop f ] if ;
: loading-gif>image ( loading-gif -- image ) : gif>image ( loading-gif -- image )
[ <image> ] dip [ <image> ] dip
[ dimensions >>dim ] [ dimensions >>dim ]
[ drop RGBA >>component-order ubyte-components >>component-type ] [ drop RGBA >>component-order ubyte-components >>component-type ]
@ -258,4 +258,4 @@ ERROR: loading-gif-error gif-image ;
dup loading?>> [ loading-gif-error ] when ; dup loading?>> [ loading-gif-error ] when ;
M: gif-image stream>image ( path gif-image -- image ) M: gif-image stream>image ( path gif-image -- image )
drop load-gif ensure-loaded loading-gif>image ; drop load-gif ensure-loaded gif>image ;