|
From: torhu <tor...@gm...> - 2011-12-13 07:12:03
|
On 13.12.2011 04:01, Adam 'foo-script' Rakowski wrote:
> I write a program that performs some pixel-level operations on image. I don't want to display these images, nor initialize display window.
> The allegro_init() and set_color_conversion(COLORCONV_TOTAL) were called, but unfortunately makecol/getcol works wrong.
>
> Variable "img" is properly loaded image (pcx)
> --CODE--
> putpixel(img, 10, 10, makecol(255, 0, 0) );
> printf("Col: %d\n", getpixel(img, 10, 10));
> --CODE--
>
> Output is: 1
> The image after procesing and saving to file looks unchanged.
>
> Why?
I think you need to call set_gfx_mode before using makecol. There might
be a workaround, but I don't know what it is.
You will probably get help quicker if you use the programming forum at
allegro.cc, there's not a lot of activity on this mailing list.
|