|
saving a bitmap question |
Scooter
Member #16,799
January 2018
|
Hi again: temp_image = al_create_bitmap(screen_width, working_screen_height); al_save_bitmap("sample.png", temp_image); al_destroy_bitmap(temp_image); Thanks for your time! |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Hi Scooter. The answer is relatvely simple. Just pass a different bitmap pointer to al_save_bitmap. edit My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: Thanks! |
Dizzy Egg
Member #10,824
March 2009
|
The concept of saving a rotated bitmap doesn’t really make much sense, all bitmaps are square/rectangle. You could either save a square, which has a height and width of the biggest original w/h (ie, a 320x240 bitmap would be saved as 320x320), or you could add some logic to determine the minimum rectangle size required based on rotation…
---------------------------------------------------- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
To get the rotated width and height you need a little trigonometry. I'll write it out when I get home. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: I know the 4 corners of the image before rotating. I Very good! Thanks for the tip! |
|