At 5:28 PM -0500 9/9/04, you wrote:
I'm trying to create a series of thumbnails with rounded corners. Do I *have* to do it in two passes (see below)?

yes - but you might save a little processing time, by moving the creation of outImage up
(to just below the tmpImage creation)


outImage = tmpImage.duplicate()

also destRect is the same as aTemplate.rect so you don't really need that variable either

hth
-Buzz


It works fine, just trying to optimize...

--aTemplate=the member of the template image (160x120 with rounded corners)
--inMember=the member of the large image
--aMask= (member identical to aTemplate except 1 bit).image.createmask()
--outMember=new(#bitmap)


on createThumbNail aTemplage, inMember, outMember --get thumbnail template image tmpImage=aTemplate.image.duplicate() --simplified for list purposes destRect=rect(0,0,160,120)

   --PASS 1
   --create thumbnail out of larger image
   tmpImage.copyPixels(inMember.image, destrect,inmember.rect)

   --PASS 2
   --now round the edges of thumbnail
   outImage=aTemplate.image.duplicate()
   outImage.copyPixels(tmpImage,destRect,destRect,[#maskimage:amask])
   outMember.image=outImage
end



--

   Thank you,

   Stephen

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to