Thread: Images

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    6

    Images

    I am doing some work that requires image manipulation. Up to this point, I have simply been reading image data from raw image data in RGBA format, and storing image data as an array of integers, a width, and a height.

    However, now I am adding some functionality in which I would like to be able to rotate images. However, as I am not into re-inventing the wheel and as I am pretty sure that other people have done this far better than I could, I have been looking for an image manipulation library in C.

    I have not yet been able to find one. Is there a library in C that allows loading of images and then rotation of those images?

    Thank you.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I'm sure there are...
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    I did this a while back with just basic bitmaps as you described. It can be a little daunting but can be done. It makes it easier if you have loaded them in some sort of 2D array. From there it is just figuring the algorithm to do a simple rotation. iirc, it took me only a few lines of code.

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    6
    I was hoping for something more elegant / optimized, perhaps something that did some aliasing too. Does anyone know of a library that already does this, or am I going to have to make some myself?

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CBitmap + big images = bad?
    By dug in forum Windows Programming
    Replies: 18
    Last Post: 06-28-2003, 11:53 PM
  2. Images
    By gvector1 in forum C++ Programming
    Replies: 7
    Last Post: 02-25-2003, 09:59 AM
  3. images, icons, and cursors, OH MY!
    By DarkViper in forum Windows Programming
    Replies: 3
    Last Post: 01-07-2003, 02:26 PM
  4. STL, Queues And Images
    By simly01 in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2002, 12:31 PM
  5. A simple question on Images....
    By LonelyPlanetWa in forum C Programming
    Replies: 7
    Last Post: 05-20-2002, 07:34 AM