Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Resize/Crop a bitmap image in C++

  • 16-01-2004 11:20pm
    #1
    Closed Accounts Posts: 223 ✭✭


    Does anyone know how to resize or crop a bitmap image?. Also each time i read an image into my program, if the width of the image is not divisible by 4 the pixel data gets messed up. Does any one know why?


Comments

  • Closed Accounts Posts: 437 ✭✭casper-


    I'm assuming you're talking about BMP files; welcome to their weird and 'wonderful' world :)

    1a) resize - there are several ways of doing this; you'd need to decide what your goals are first

    1b) crop - pretty straightforward, just read the part of the data you want into a new array

    2) if it's not divisible by four you may need to pad out the extra bytes and then continue

    There's tons of information on this on google ....


  • Closed Accounts Posts: 3 motyl


    don't know why you bother doying editing yourself!
    well, i'd understand if you need to write pretty fast game engine or so ....

    the best you can do is to find out WHAT EXACTLY you need now and will need in the future (editing-wise) and then search web for components that can do it. there's looooooooadz of them for free.

    the best i've used so far was Pegasus ImageXPress


Advertisement