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 / Bug in Make Memblock from Image in combination with DDS-Files

Author
Message
DoerrSt
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location:
Posted: 8th Sep 2011 23:59
Hello,

looks like I found a Bug in the current DBPro-Version. If you execute these commands:

Load Image "anyfile.dds",1
Make Memblock from Image 2,1

do
Paste Image 1,0,0
if memblock exist (2)
text 100,110,str$(memblock exist (2))
text 100,120,str$(GET MEMBLOCK SIZE (2))
else
text 100,110,"Doesn't exist"
endif
loop

you will see the image loaded and the memblock created but the size of the memblock was returned with 12 bytes.
It works fine with JPGs as well as BMPs

Regards,



Stefan
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Sep 2011 12:53 Edited at: 9th Sep 2011 12:54
Works fine for me using U77RC7. The test image I used was 128x128 so 128x128x4+12 = 65548 which is the correct value shown (the 12 extra bytes are the header).

Could you post an image which gives you this problem? Also, which version of DBPro are you using?

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: 9th Sep 2011 13:05 Edited at: 9th Sep 2011 14:07
I can reproduce your bug by using a compressed image format. Here's the same test image but changed to DXT5 format. It returns 12 bytes as you say.

Since the command works correctly with other compressed file formats I'd say this is definitely a bug.



Edit Why won't the forum display this image???

Edit2 I have a feeling that the "bug" may be an unavoidable "feature" of the way compressed dds files are stored in memory. Certainly a comment in the Help file would be useful if that's the case. I'm sure someone can clarify this for us.

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Sep 2011 03:14 Edited at: 10th Sep 2011 03:20
I may have run into the same bug.....

When you create a memblock from an image its directly related to what bit mode your graphics mode is running in.

EG.
i made a memblock from an image in 16bit .... and the memblock bytes returned is in correct.

The only way to fix the command is to make sure your running in 32bit mode.

can be tested with this command if you have the plugin it came from

bitmode=display depth()
if bitmode<>32 then message "kill the app and prompt the user to change graphics modes":end


edit:may not be the same problem your having.... but is one that i have noticed

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Sep 2011 12:47
I think that's a different issue. The problem here is specific to DDS files and I suspect there might not be a simple solution. Not sure though.

Login to post a reply

Server time is: 2024-03-29 15:38:24
Your offset time is: 2024-03-29 15:38:24