[AD] stretch_blit() ob1 error

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


has anyone been made aware of the stretch_blit() scaling error... as mentioned on the allegro.cc forums.

attached is a small test app... approx 50 lines of easily read c code.
and a copy of the 2 output files the code makes, apologies for using .BMP format.

the problem occurs when scaling a 3x3 image to 9x9.... its not centred.
#include "allegro.h"
int main(void)
{
    BITMAP *b;
    BITMAP *b2;
    int w;

    allegro_init();
    set_color_depth(32);
    w = makecol32(255,255,255);
    b = create_bitmap(3,3);
    clear_bitmap(b);
    putpixel(b,0,1,w);
    putpixel(b,1,0,w);
    putpixel(b,1,2,w);
    putpixel(b,2,1,w);
    save_bitmap("1.bmp",b,NULL);

    b2 = create_bitmap(b->w*3,b->h*3);
    stretch_blit(b,b2,0,0,3,3,0,0,9,9);
    save_bitmap("2.bmp",b2,NULL);
return 0;
}
END_OF_MAIN()

Attachment: 2.bmp
Description: Binary data

Attachment: 1.bmp
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/