Transparency
Richmond Mathewson
geradamas at yahoo.com
Fri Feb 6 14:32:25 EST 2009
I wrote:
"HOWEVER; the result is a PNG of the odd-shape with a 'cute' little,
white drop-shadow: I wonder why."
I just tried this with a circular PNG as the original image
and the end result had quite a fat white border all around it
which would seem to indicate that when the SNAPSHOT is imported
into the "HOLDER" image it shrinks a bit . . .
on mouseUp
create image "HOLDER"
set the transparent of img "Circle.png" to true
put top of group "gZ" into TOPP
put bottom of group "gZ" into BUM
put left of group "gZ" into LEFTT
put right of group "gZ" into RITE
put LEFTT & "," & TOPP & "," & RITE & "," & BUM into fld "fRECT"
put fld "fRECT" into FRECT
put the windowID of this stack into WINDY
set the fileType to empty
set the width of img "HOLDER" to the width of img "Circle.png"
set the height of img "HOLDER" to the height of img "Circle.png"
export snapshot from rect FRECT of window WINDY to img "HOLDER" as PNG
set the width of img "HOLDER" to the width of img "Circle.png"
set the height of img "HOLDER" to the height of img "Circle.png"
set the alphaData of img "HOLDER" to the alphaData of img "Circle.png"
export img "HOLDER" to file "ROUND.png" as PNG
delete image "HOLDER"
end mouseUp
----------------------------
so the alphaData of the original PNG does not 'fit' the new image
'snugly' . . .
"Throw me a frikking bone!"
sincerely, Richmond Mathewson.
____________________________________________________________
A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________
More information about the use-livecode
mailing list