Results 1 to 2 of 2

Thread: PolygonWarpImage

Hybrid View

  1. #1
    guest Guest

    Default PolygonWarpImage

    I'm trying to clip part of a source image and warp it out to an output image, also as a clip. The input and output points don't seem to do anything - I always get the whole input image warped into the output image with a black background and a row of unwanted pixels at the top of the output image. Changing the input quadrilateral points slightly causes strange effects and changing the output quadrilateral points slightly seems to cause unpredictable warping to occur. Most times the entire input image is made huge. My input and output picture boxes are the same size.

    Making the input and output quadrilateral points the same, no matter what they are set to, just makes a copy of the whole input image in the output image, even if I specify a tiny rectangle for the input and output. I don't understand what the input and output points are supposed to be for. I would have thought making a 20x20 input and output square would just copy the 20x20 quadrilateral to the output, but the entire input image is always copied to the ouput by the PolygonWarpImage function.

    Has anyone succeeded in warping a part of the input image to output, and warping it as well?

    I'm using Visual Basic.

  2. #2
    Join Date
    Mar 2006
    Raleigh, NC

    Default RE: PolygonWarpImage

    i think the function header is a bit misleading about what the input points do. they're not really for clipping from the source, their use is more, um... subtle (in other words - i'd have to revisit the source to find out exactly what they're doing).

    but it hink you should be able do the clipping+warping by using the rowStride tricks:

    Chris Losinger
    Smaller Animals Software, Inc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts