Fun With ImageData, MaskData and AlphaData

Ken Ray kray at sonsothunder.com
Sun Jul 7 23:39:01 EDT 2002


Re: Fun With ImageData, MaskData and AlphaDataThanks for the kudos, Mark! Yeah, I discovered that that bytes are switched between Mac and Windows; glad you got some use out of it...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

  ----- Original Message ----- 
  From: Mark Luetzelschwab 
  To: metacard at lists.runrev.com 
  Sent: Friday, July 05, 2002 10:52 AM
  Subject: Re: Fun With ImageData, MaskData and AlphaData


  Ken,


  Thanks for sharing these functions about imageData, etc....they were always in the arena of "when I might have some time"...but now they are quite within my grasp!


  Two items:


  1. The order that you had in your example for making the 50% transparent blue image:


  repeat with i = 1 to 400
      put binaryEncode("CCCC",255,0,0,0) after iData
      put binaryEncode("C",128) after aData
    end repeat


  did not work for me on my Mac, using 2.3.2


  I had to switch the order:


  repeat with i = 1 to 400
      put binaryEncode("CCCC",0,0,0,255) after iData
      put binaryEncode("C",128) after aData
    end repeat


  2. Just for fun - I added a red-to-blue gradient..you can add to your page if you so desire!


  (this is for a 16 x 16 image - will require some more calculations for other images)


  repeat with i = 1 to 256
      put binaryEncode("CCCC",0,min(i,255),0,max(255,255-i)) after iData
      put binaryEncode("C",128) after aData
    end repeat


  Thanks again - your work is most appreciated!


  -ml


-- 

  Mark J. Luetzelschwab                   luetzm at texasreading.org      
  Texas Center for                   (v) (512) 232 9477
  Reading and Language Arts             (f) (512) 232 2322              
  http://www.texasreading.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20020707/aced7500/attachment.htm


More information about the metacard mailing list