At 3:13 PM -0400 9/7/00, grimmwerks wrote:
>Cool - thanks Blake. Unfortanely I can't even figure out my age with my
>socks off. But we'll see...

If I took my socks off, I'd be dead (as would everyone in the building.)

Terry

And just so I won't get railed on for an OT post, here:

on scaleImage whichImage, toWhatPct
  -- verify the imageObject
  if NOT ilk(whichImage, #image) then return VOID
  -- verify the scale
  if toWhatPct < 1 then return whichImage
  -- compute the new rect based on the scale
  newRect = whichImage.rect * (toWhatPct / 100.0)
  -- create the new image buffer sized as needed
  -- retain all other attributes of the original image
  alphaImage = whichImage.extractAlpha()
  if ilk(alphaImage, #image) then
    alphaDepth = alphaImage.depth
  else
    alphaDepth = alphaImage
  end if
  newImage = image(newRect.width, newRect.height, whichImage.depth,
alphaDepth, whichImage.paletteRef)
  -- scale the original image to the new size
  newImage.copyPixels(whichImage, newImage.rect, whichImage.rect)
  -- return the new image object
  return newImage
end scaleImage

-- 
Terry R. Schussler, CTO, Trevi Media
Less Signature -- More Filling!

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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