Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / [DBPro U7.5] inconsistent behaviour with get image and save image

Author
Message
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Jul 2010 16:19 Edited at: 24th Jul 2010 19:25
I expected the image retrieved by the get image command to have fixed dimensions. In fact it doesn't as the following demo shows. In some situations the image is stretched (as expected), in others it isn't. Also, the behaviour differs between my Vista and XP machines as follows:

Vista PC (nVidia GFX card)
--------------------------
saved version is stretched to next powers of 2 (expected behaviour)
image width() and image height() return unstretched values (not expected)
sprite uses unstretched version of image (not expected)

XP Laptop (ATI integrated GFX card)
-----------------------------------
saved version is stretched to next powers of 2 (expected behaviour)
image width() and image height() return unstretched values (not expected)
sprite uses stretched version of image (not sure whether this is expected!!!)

Here's the code: (image attached - but I guess any image might do)



Edit Addendum: If the get image texture flag is set to 1 then things work correctly on my Vista machine, but if set to 0 then the behaviour is as described above, i.e. inconsistent. I'll add the results for my XP laptop later.

Edit2 Well. The results for my XP laptop are very weird - each of the following options fails to work consistently:

get image 1, 0, 0, sw, sh
get image 1, 0, 0, sw, sh, 0
get image 1, 0, 0, sw, sh, 1 (see Edit4 below)

In the first two the sprite dimensions are scaled to the next powers of 2 as are those of the saved image. But image width(1) and image height(1) both report the unscaled dimensions. My understanding is that they should all be scaled.

In the third, the sprite is scaled but the reported dimensions and the saved copy are all unscaled. My understanding is that they should all be unscaled.

Edit3 Changed and simplified the code snippet to focus on the relevant parts. Also changed the source image file.

Edit4 The third option of the revised snippet DOES work correctly on both XP and Vista (not sure why I thought it didn't ). It's the first two that give confused results.

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Aug 2010 21:41
I think this is the same bug that pcraider reported a long time ago. It seems to have been fixed and then broken again (although I don't think I ever saw the "fixed" version )

Here's the thread:

get image problem

Login to post a reply

Server time is: 2024-04-25 06:10:53
Your offset time is: 2024-04-25 06:10:53