Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Rotation of a bitmap image (C++)

    Hi.
    I'm new at programming and I need some help with a task assigned for me.
    I've been asked to Make a C++ program that can rotate an image q degrees around the point (x,y).

    So far I have modified a program a friend of mine made that inputs the bitmap image and outputs a the new image, so that it works for what I want it to do.

    I'm having trouble figuring out how to make the algorithm that rotates the image and how to code it. Another problem i'm having is that i'm quite new to programming, I can read and understand code but I have a really hard time just writing code.

    Here's what I have made so far:
    http://pastebin.com/VrxEYZMv
    (The function rotate is the one i'm trying to make)

  • #2
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've gotten the idea that I could interpret every pixel as a vector and rotate said vector using a 2d rotation matrix, but i'm not sure how I should do so.


  •  

    Posting Permissions

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