I don't have any alphaData related code in my script. But my image dropzone systematically removes plain white from any image dragged in.
See screen shot here : https://skitch.com/doobox/ec91y/rapid-icons
Here is the part of the handler that produces that image when it is dropped :
Code: Select all
on dragDrop
set the itemDelimiter to "."
// only allow files of type below
put "jpeg.jpg.png.bmp.tiff.tif" into tAllowedFiles
if the last item of dragData["files"] is among the items of tAllowedFiles then
import paint from file dragData["files"]
set the visible of last img to false
put last img into fullSizeImageData -- save the origonal for later
put the width of the last image into tOrigonalImageWidth
put the height of the last image into tOrigonalImageHeight
if tOrigonalImageWidth < 57 or tOrigonalImageHeight < 57 then
answer "Images must be greater than 56px x 56px" with "OK" as sheet
exit dragDrop
end if
delete last img
put fullSizeImageData into me
// 200 for show
if tOrigonalImageWidth < 200 or tOrigonalImageHeight < 200 then
if tOrigonalImageWidth < tOrigonalImageHeight then
rescaleIcon "photoDropZone", tOrigonalImageWidth
else
rescaleIcon "photoDropZone", tOrigonalImageHeight
end if
else
rescaleIcon "photoDropZone", 200
end if
rescaleIcon "photoDropZone", 200
crop img "photoDropZone" to the rect of graphic "photoMountBG"
set the visible of image "dropHint" to false
set the imagedata of image "photoDropZone" to the imagedata of image "photoDropZone"
put image "photoDropZone" into tCroppedImage