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. C / C++ / MFC
  4. Advanced blitting or bitmap mapping

Advanced blitting or bitmap mapping

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsgame-devcomquestion
6 Posts 4 Posters 0 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.
  • N Offline
    N Offline
    Niklas L
    wrote on last edited by
    #1

    I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance

    home

    C K C 3 Replies Last reply
    0
    • N Niklas L

      I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance

      home

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Niklas Lindquist wrote:

      I want to transform into an arbitrary four-sided convex polygon.

      It is a quadrilateral, isn't it?

      Niklas Lindquist wrote:

      Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself

      Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      N 2 Replies Last reply
      0
      • C CPallini

        Niklas Lindquist wrote:

        I want to transform into an arbitrary four-sided convex polygon.

        It is a quadrilateral, isn't it?

        Niklas Lindquist wrote:

        Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself

        Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        N Offline
        N Offline
        Niklas L
        wrote on last edited by
        #3

        ;P

        home

        1 Reply Last reply
        0
        • C CPallini

          Niklas Lindquist wrote:

          I want to transform into an arbitrary four-sided convex polygon.

          It is a quadrilateral, isn't it?

          Niklas Lindquist wrote:

          Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself

          Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          N Offline
          N Offline
          Niklas L
          wrote on last edited by
          #4

          I had to look it up, but yes, it's one of them quadriwhatevers. :)

          home

          1 Reply Last reply
          0
          • N Niklas L

            I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance

            home

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            My favourite Bitmap articles at CP: Add fast user-extensible image processing support to CBitmap[^] CBitmapEx - Free C++ Bitmap Manipulation Class[^] I hope it can help. :zzz:

            Press F1 for help or google it. Greetings from Germany

            1 Reply Last reply
            0
            • N Niklas L

              I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance

              home

              C Offline
              C Offline
              Chris Losinger
              wrote on last edited by
              #6

              i know it's bad form to plug your own products, but this will do it[^]. though it's not free (not really expensive, either). the DLL download package contains an app called ISDemo.exe, which does quad->quad warps.

              image processing toolkits | batch image processing

              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