Please, i need changing images colors. For exemplo, I need change my IMAGE.JPG to green. I need get two images to do anaglyph, is possible with Allegro?
How do it?
Maybe 'al_draw_tinted_bitmap' is what you are lookig for?
Hi, tks for your comment but I used this command. It return an image original and tinted in the same. How separate both and save only the tinted?
The image is attached and the code is below:
ALLEGRO_BITMAP *bmp = NULL;
char path[256] = "C:\\Dev\\ProgVisualizarEstereo\\";
strcpy(cta, path);
sprintf(numero, "I1");
strcat(cta, numero);
strcat(cta, ".jpg");
sprintf(filename, "%s", cta);
bmp = al_load_bitmap(filename);
al_draw_tinted_bitmap(bmp, al_map_rgb(255, 0, 0), 0, 0, 0);
al_draw_scaled_bitmap(bmp, 150, 150, 4608, 2592, 400, 100, 2100, 1300, 0);
al_flip_display();
al_destroy_bitmap(bmp);
It sounds like you want to save a bitmap with
<code>
/* Make a bitmap to save. */
ALLEGRO_BITMAP *bitmap_to_save = al_create_bitmap(....,....);
al_set_target_bitmap(bitmap_to_save);
/* draw tinted bitmap to bitmap_to_save : */
al_draw_tinted_bitmap(bmp, al_map_rgb(255, 0, 0), 0, 0, 0);
then al_save_bitmap();