normalizing alpha data for tiffs is done too often, check in test image for it

db4
Doug Coleman 2009-03-16 07:11:56 -05:00
parent bb33894d8a
commit 8eea41b537
1 changed files with 16 additions and 18 deletions

View File

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