Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. Image Warp Function needed.

Image Warp Function needed.

Scheduled Pinned Locked Moved Graphics
help
3 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SandipG
    wrote on last edited by
    #1

    Hi , I need a function to warp image . Warp(HBITMAP,HBITMAP,point1,point2,point3,point4) or Warp(Byte*,Byte*,inputsize,point1,point2,point3,point4) this function would tranform image to fit the quadrilateral pointed by four points. there is artical on codeproject AAform which is really very good but it is very slow. for me that quadrilateral will always be convex. Some help in this will be highly appreciated Thanks in advance. Sandip.

    F 1 Reply Last reply
    0
    • S SandipG

      Hi , I need a function to warp image . Warp(HBITMAP,HBITMAP,point1,point2,point3,point4) or Warp(Byte*,Byte*,inputsize,point1,point2,point3,point4) this function would tranform image to fit the quadrilateral pointed by four points. there is artical on codeproject AAform which is really very good but it is very slow. for me that quadrilateral will always be convex. Some help in this will be highly appreciated Thanks in advance. Sandip.

      F Offline
      F Offline
      Force Code
      wrote on last edited by
      #2

      There's the old PlgBlt fron GDI: "The PlgBlt function performs a bit-block transfer of the bits of color data from the specified rectangle in the source device context to the specified parallelogram in the destination device context." However, it probably doesn't do the anti-aliasing mentioned in the AAForm article. Have you looked at the GDI+ functions? There looks to be about twenty different 'DrawImage' methods in the Graphics class, as well as a SetSmoothingMode method with a SmoothingModeAntiAlias as an option (although this method may just apply to lines and curves).

      S 1 Reply Last reply
      0
      • F Force Code

        There's the old PlgBlt fron GDI: "The PlgBlt function performs a bit-block transfer of the bits of color data from the specified rectangle in the source device context to the specified parallelogram in the destination device context." However, it probably doesn't do the anti-aliasing mentioned in the AAForm article. Have you looked at the GDI+ functions? There looks to be about twenty different 'DrawImage' methods in the Graphics class, as well as a SetSmoothingMode method with a SmoothingModeAntiAlias as an option (although this method may just apply to lines and curves).

        S Offline
        S Offline
        SandipG
        wrote on last edited by
        #3

        I tried GDI+ DrawImage but it will always fit image in parallelogram where is in my case it always need not be parallelogram.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups