Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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 | 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