Thread: Image displaying

  1. #16
    C/C++ homeyg's Avatar
    Join Date
    Nov 2004
    Location
    Louisiana, USA
    Posts
    209
    Thanks so much, guys. I have everything sorted out now!

  2. #17
    C/C++ homeyg's Avatar
    Join Date
    Nov 2004
    Location
    Louisiana, USA
    Posts
    209
    Okay, now back to my original problem of image displaying; tutorial 2, in the link that prog-bman posted, which is supposed to teach you how to display a bitmap, just changes the screen resolution but nothing else (you can still see the IDE and everything, except in a different resolution). Here's the code:

    Code:
    #include <allegro.h>
    
    int main(int argc, char* argv[])
    {
        allegro_init();
        
        install_keyboard();
        
        set_color_depth(16); 
        set_gfx_mode(GFX_AUTODETECT, 640,480,0,0);
        
        BITMAP *my_pic;
        my_pic = load_bitmap("my_bitmap.bmp", NULL);
        
        acquire_screen();
        blit(my_pic, screen, 0,0,0,0,640,480);
        release_screen();
        
        readkey(); 
        destroy_bitmap(my_pic);
        
        return 0;
    
    }
    END_OF_MAIN();
    What's the deal here? (and yes, I do have a file called my_bitmap on my computer)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Loading & displaying an image
    By csonx_p in forum Windows Programming
    Replies: 1
    Last Post: 06-19-2008, 06:40 AM
  3. Displaying an Image
    By evanman in forum C++ Programming
    Replies: 3
    Last Post: 07-07-2006, 01:04 PM
  4. Button Displaying Image
    By mrafcho001 in forum Windows Programming
    Replies: 4
    Last Post: 12-03-2005, 02:14 PM
  5. Displaying a PNG image
    By grep in forum Windows Programming
    Replies: 5
    Last Post: 07-07-2005, 08:27 PM