Transparent

Richmond Mathewson geradamas at yahoo.com
Fri Feb 6 02:25:56 CST 2009


Lay awake for hours last night, and in the wee hours of the
Brahma-Muhurta thought (!!!!) I had a brilliant idea:

When attempting to make a PNG with an odd-shape and transparent area
from an original PNG and text on top of it why not set the alphaData of
the end-product to that of the original PNG:

on mouseUp
  put top of group "gX" into TOPP
  put bottom of group "gX"  into BUM
  put left of group "gX"  into LEFTT
  put right of group "gX"  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
     export snapshot from rect FRECT of window WINDY to img "HOLDER" as PNG
     set the alphaData of img "HOLDER" to the alphaData of img "Yellow.png"
     export img "HOLDER" to file "GOTTIT.png" as PNG
end mouseUp


where "Yellow.png" is the name of the original PNG contined within the 
group "gX".

Ha, Ha, Ha . . . so much for 'brilliant' ideas:

end up with an image which did, indeed contain the original image
with text overlaying it: but in 'Tiger Stripes', where the alphaData
of the original PNG obviously had little or nothing to do with
the white/transparent areas of the original PNG.

setting the TRANSPARENT of the original PNG to true had no result.

Oh, Well, coffee-break finished; back to the "tinies" downstairs.

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