Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, Ayumi), 773 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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