Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 7th_zorro), 1,203 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap_blitpart odd behaviour #239313
12/03/08 22:30
12/03/08 22:30
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
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



Click and join the 3dgs irc community!
Room: #3dgs
Re: bmap_blitpart odd behaviour [Re: Joozey] #239353
12/04/08 07:34
12/04/08 07:34
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Can you upload or send the project to Support? We'll look into it. It could be a bug in the function.

Re: bmap_blitpart odd behaviour [Re: jcl] #239372
12/04/08 10:19
12/04/08 10:19
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands


Click and join the 3dgs irc community!
Room: #3dgs
Re: bmap_blitpart odd behaviour [Re: Joozey] #239454
12/04/08 19:22
12/04/08 19:22
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline
User
sheefo  Offline
User

Joined: Jul 2006
Posts: 783
London, UK
I have the same problem with bmap_blitpart(). Theres a problem with the Y scaling!

Re: bmap_blitpart odd behaviour [Re: sheefo] #239548
12/05/08 11:49
12/05/08 11:49
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I confirm this bug - the y value of the source size must be zero. This will be fixed.


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1