[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am developing 'Eye Surgery process' in director MX, using imaging lingo...
> After cutting,  peel effect is also looking ok., But i have to use
> copyPixels()with quad and rect.
> 
> At this point getting difficulty to convert cut marks data to rect.

Hi Anil ,

I am not quite sure what you are asking.  Could you be more specific about
the format of the cut marks data.

As a long shot, here is a handler that copies a quad shape from one image to
another.

Cheers,

James

on copyQuad(aPasteImage, aCopyImage, aQuad) --------------------------
  -- INPUT: <aPasteImage> and <aCopyImage> are image objects which
  --         are assumed to be the same size
  --        <aQuad> is a list of four points
  -- ACTION: copies the area defined by <aQuad> from <aCopyImage> to
  --         <aPasteImage>
  -- EXAMPLE:
  --   tQuad = [point(3, 3), point(27, 1), point(24, 17), point(1,19)]
  --   copyQuad(member("Target").image, member("Source).image, tQuad)
  --------------------------------------------------------------------
  
  -- Create a quad mask
  tRect = aPasteImage.rect
  tMask = image(tRect.width, tRect.height, 1)
  
  tBlack = image(1, 1, 1)
  tBlack.setPixel(0, 0, rgb(0, 0, 0))
  
  tMask.copyPixels(tBlack, aQuad, rect(0, 0, 1, 1))
  
  -- Use the mask to copy only the relevant pixels
  tOptions = [#maskImage: tMask]
  return aPasteImage.copyPixels(aCopyImage, tRect, tRect, tOptions)
end copyQuad

[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