Image displaying

This is a discussion on Image displaying within the C++ Programming forums, part of the General Programming Boards category; Thanks so much, guys. I have everything sorted out now!...

  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)

Page 2 of 2 FirstFirst 12
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, 05:17 AM
  2. Loading & displaying an image
    By csonx_p in forum Windows Programming
    Replies: 1
    Last Post: 06-19-2008, 07:40 AM
  3. Displaying an Image
    By evanman in forum C++ Programming
    Replies: 3
    Last Post: 07-07-2006, 02: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, 09:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21