bmap_blitpart odd behaviour

Posted By: Joozey

bmap_blitpart odd behaviour - 12/03/08 22:30

The case:

Code:
BMAP* sprite = bmap_createblack(16, 16, 24);
BMAP* spriteset = bmap_create("test.bmp");

bmap_blitpart(sprite, spriteset, vector(0, 0, 0), vector(16, 16, 0), vector(0, 0, 0), vector(16, 16, 0));


I want to grab a 16x16 part of a 128x32 BMP file, from the top left corner. No scaling, just cutting out the number 1, as seen in the image below.

Original image:


The result:


The result is scaled in y direction for no apparent reason. There's nothing wrong with the X direction. If the source image would have been 128 pixels in length, then the cut-out image is a full scale to the destination bitmap length, in y direction only.

I can't think of anything but that this is a bug. I tested it with tga and jpg files, same results. I used NULL instead of vector(), and tried to alter every value, but everything else seem to work fine.

I can't imagine that this is a problem caused by my code. But if it turns out to be so, then I apologise for this thread.

Kind regards,
Joozey

Posted By: jcl

Re: bmap_blitpart odd behaviour - 12/04/08 07:34

Can you upload or send the project to Support? We'll look into it. It could be a bug in the function.
Posted By: Joozey

Re: bmap_blitpart odd behaviour - 12/04/08 10:19

Here's the project:

www.joozey.nl/3dgs_bmapblit_bug.rar
Posted By: sheefo

Re: bmap_blitpart odd behaviour - 12/04/08 19:22

I have the same problem with bmap_blitpart(). Theres a problem with the Y scaling!
Posted By: jcl

Re: bmap_blitpart odd behaviour - 12/05/08 11:49

I confirm this bug - the y value of the source size must be zero. This will be fixed.
© 2024 lite-C Forums