I'm testing out a new program I'm about to make, and created a nice 1280 X 960 BMP image in Photoshop of a field with grass. When I try to load this image into my c++ program running Allegro, the image looks AWFUL. Some of the grass has turned blue, there is serious discoloration, and you can't really tell what it is anymore.

Does anyone know why this problem would occur? Here is a snippet of code:

allegro_init();
    install_keyboard();
    set_gfx_mode( GFX_AUTODETECT, 1280, 960, 0, 0);
    install_mouse();
    
 ground = load_bitmap("ground.bmp", NULL);

//later in code...

draw_sprite(screen, ground, 0, 0);

Thanks everyone so much in advance :D

It sounds like color conversion is happening somewhere between the file and your screen. I see you aren't specifying color depth for your display--I don't remember what Allegro defaults to, but it's possible that your display surface and the bitmap have different color settings.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.