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

db4
Slava Pestov 2009-03-16 20:54:36 -05:00
commit e1a358a30c
7 changed files with 22 additions and 23 deletions

View File

@ -83,14 +83,15 @@ ERROR: bmp-not-supported n ;
:: fixup-color-index ( loading-bitmap -- loading-bitmap ) :: fixup-color-index ( loading-bitmap -- loading-bitmap )
loading-bitmap width>> :> width loading-bitmap width>> :> width
width 3 * :> width*3
loading-bitmap height>> abs :> height loading-bitmap height>> abs :> height
loading-bitmap color-index>> length :> color-index-length loading-bitmap color-index>> length :> color-index-length
height 3 * :> height*3 color-index-length height /i :> stride
color-index-length width height*3 * - height*3 /i :> misaligned color-index-length width*3 height * - height /i :> padding
misaligned 0 > [ padding 0 > [
loading-bitmap [ loading-bitmap [
loading-bitmap width>> misaligned + 3 * <sliced-groups> stride <sliced-groups>
[ 3 misaligned * head* ] map concat [ width*3 head-slice ] map concat
] change-color-index ] change-color-index
] [ ] [
loading-bitmap loading-bitmap

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

View File

@ -477,10 +477,8 @@ ERROR: unknown-component-order ifd ;
[ unknown-component-order ] [ unknown-component-order ]
} case ; } case ;
: handle-alpha-data ( ifd -- ifd ) : normalize-alpha-data ( seq -- byte-array )
dup extra-samples find-tag { ! [ normalize-alpha-data ] change-bitmap
{ extra-samples-associated-alpha-data [
[
B{ } like dup B{ } like dup
byte-array>float-array byte-array>float-array
4 <sliced-groups> 4 <sliced-groups>
@ -490,13 +488,13 @@ ERROR: unknown-component-order ifd ;
] [ ] [
[ 3 head-slice ] dip '[ _ / ] change-each [ 3 head-slice ] dip '[ _ / ] change-each
] if ] if
] each ] each ;
] change-bitmap
] } : handle-alpha-data ( ifd -- ifd )
{ extra-samples-unspecified-alpha-data [ dup extra-samples find-tag {
] } { extra-samples-associated-alpha-data [ ] }
{ extra-samples-unassociated-alpha-data [ { extra-samples-unspecified-alpha-data [ ] }
] } { extra-samples-unassociated-alpha-data [ ] }
[ bad-extra-samples ] [ bad-extra-samples ]
} case ; } case ;