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 / Make Memblock From Image doesnt work.

Author
Message
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 13th Nov 2005 10:12
Try it. Load a image, and try to make a memblock from it, it wont work (at least not in 5.8). You have to set the load image flag to 1 (no mipmaps) or you get a 'image locked by system error'.

I never really tryed to use this command until I started having trouble with set camera to image. Im pretty sure the two issues are related, but I thought id make a new thread so this bug could get singled out in time for 5.9. Check out my other thread here...

http://forum.thegamecreators.com/?m=forum_view&t=62297&b=15

Please say you can squeeze this fix in in time for 5.9! (any extra features that have been requested in my set camera to image thread would be dandy as well)

All you need is zeal
jrowe
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 13th Nov 2005 11:27 Edited at: 13th Nov 2005 16:36
This is meant to be like this, it's not a bug. If the texture flag wasn't set to 1 the image would contain mip maps and wouldn't be pixel perfect to image you started with either AND you'd require several memblocks for one image (because of mip maps). What you're suggesting would mean a serious bit of coding for no real gain, just use the texture flag of 1.

Edit: If you want to use it with "set camera to image" just use "Get Image" with the texture flag set to one.

Tinnedhead Productions

For Fathers and Sons who enjoy wholy spirits.
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 13th Nov 2005 21:34 Edited at: 13th Nov 2005 22:02
You cant set the texture flag for set camera image, and get image (among other options, locking pixels, pasting, ect...) is way to slow.

Why would it require a serious bit of coding just to say, if a image has mipmaps, and you call the make memblock from image command, have it convert the default res mipmap, and ignore the others. Why is that WORSE than a error crashing your program?

All you need is zeal
jrowe
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 13th Nov 2005 23:49 Edited at: 14th Nov 2005 00:04
I'm not sure if it would take a lot of coding, but from what I've read in the past, I thought it might. Images with mipmaps are stored in the graphics memory with DirectX Texture compression, to take up less memory (and you can therefore have about twice as many textures), but with the texture flag set to 1 there are stored as RGBA images so a conversion would be needed. I've just been thinking about this and it turns out DBPro is good at savng images, as it can save as DDS and BMP. I assume such a conversion would be relatively simple to implement. So I was probably wrong (lucky you) .

Edit: What exactly do you want to do with your image exactly? What sort of manipulation do you want to do with the memblock- there's often a workaround and if I can see one, I'll help.

Tinnedhead Productions

For Fathers and Sons who enjoy wholy spirits.
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 14th Nov 2005 00:05 Edited at: 14th Nov 2005 00:05
Yeah I was just going to mention that, cant dbpro save dds images? So it has to have the ability to convert between bmp and dds (mipmaps). Just apply that conversion when make memblock from image is called (if its even needed).

So we have two options

1.) Fatal error that crashes the program, killing many kittens

2.) Grab info for ONE of the mipmaps (the default res) and convert it to a memblock

Cmon Mike!

All you need is zeal
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Nov 2005 15:34
As much as I would like additional functionality, I'm not too keen on cats, mainly because my neighbour takes in all the strays and they use my garden as a toilet. So I opt for number 1 please.

Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 15th Nov 2005 00:01
How can you hate kittens! Cmon!

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 15th Nov 2005 00:36
The only thing wrong with kittens is that they eventually become cats.

Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 15th Nov 2005 02:25
!!! Back me up Mike I know you like cats

All you need is zeal
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 15th Nov 2005 13:28 Edited at: 15th Nov 2005 13:33
I am not sure if this has anything to do with this, but according to this;
http://forum.thegamecreators.com/?m=forum_view&t=32935&b=6

They were using "make memblock command from image" quite regularly, and now in 5.8 it doesn't work?

Could someone please confirm this for me, and it might be worth while to wait until it is fixed.

My other reference to this was in the main forum.
http://forum.thegamecreators.com/?m=forum_view&t=64833&b=1

And I was trying to get the media here:
http://forum.thegamecreators.com/?m=forum_view&t=64701&b=1
Here you can download the media for the code. (if it is still there.)

Quote: "Using the memmatrix code that Phaelax and even Lee contributed to, I am getting the error:
Runtime Error 507 - Cannot read image currently locked by system at line 684.
"
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Nov 2005 16:23
That would indeed suggest it worked at some point. In the past I have used MAKE MEMBLOCK FROM IMAGE on a mipmapped image and it didn't crash. The results were damned ugly...but it didn't crash.

Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 15th Nov 2005 21:33
Save the kittens!

All you need is zeal
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 16th Nov 2005 04:18
YES!!!! Thanks Spooky!

It worked adding , 1 to the image commands!!!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Nov 2005 04:20
Quote: "Load a image, and try to make a memblock from it, it wont work (at least not in 5.8). You have to set the load image flag to 1 "


It's worked perfectly fine for me in 5.8


Deadly Night Assassins
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 16th Nov 2005 05:18 Edited at: 16th Nov 2005 05:18
Quote: "YES!!!! Thanks Spooky!"


Who you calln Spooky?

Quote: "It's worked perfectly fine for me in 5.8"


Holy crap really? And youre NOT using a 1 (no mipmap) flag right?

When you turn the memblock back into a image, does it look funky? Should look like the exact same image, right?

Save teh kittens!

All you need is zeal
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 18th Nov 2005 11:51
Phaelax are you sure it works fine for you? Please confirm

All you need is zeal
Mr Bigger
19
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 22nd Nov 2005 06:56 Edited at: 22nd Nov 2005 06:56
I'm with Zealous on this.To many dead kittens. I don't think it's a case of adding additional functionality as it is fixing something thats broken.At least an explanation as to why this can't be.I mean without the use of memory blocks how are you to get an image with the camera and texture an object with it in any reasonable amount of time while maintaining the alpha?This old dog needs fixed.

OC`ed AMD 2.2Ghz/1GB DDR ram/GeForce Fx5200 128MB/1Mb cable/W2KPro/DBPro/Updated.
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 26th Nov 2005 23:37
Can we please get this bad boy confirmed? I mean another thing, you can make a image FROM a memblock (a memblock which contains NO mipmaps), and the mipmaps are created automaticaly, so why cant you just REVERSE the proccess?

All you need is zeal
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 28th Nov 2005 19:01
I'm no expert, but I'll take a stab that mipmap compression is not lossless compression, which would mean converting it back to the original image is impossible. Then your mipmap header (and possibly image map) would have to be different than the rgba format. So I'll guess it wasn't implemented due to several complexities with the mipmap compression; after all, you still have the functionality of loading the image as an rgba (flag=1) image and using that instead. So why code something that's complex and won't be all that usefull? The best I would hope for is a flag at the end of Make Image From Memblock that allows the image to be made as a mipmap (flag=0) or rgba (flag=1).

In the meantime, here's a solution (it is slow though): Use Paste Image (or better yet, Paste Sprite as it's faster) and Get Image. You could paste your mipmaped image onto a bitmap, then use Get Image with the flag set to 1 to get an rgba image. Then turn that into a memblock. Invert the process to change an rgba memblock image into a mipmap image.


Open MMORPG: It's your game!
Spaceman
19
Years of Service
User Offline
Joined: 19th Aug 2004
Location: Germany / Adelebsen / Goettingen
Posted: 3rd Dec 2005 13:58 Edited at: 3rd Dec 2005 13:59
There is an other bug in the MAKE MEMBLOCK FROM IMAGE command! The size of the image isn't stored correctly! Try to make a memblock from an image with the size 4096 x 2048 and make a image from that memblock again. Then you will see that the new image is now 2048 x 2048 in size!? Any ideas?

Computers are humans too!
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 7th Dec 2005 22:25
Still no confirmation?... cry

All you need is zeal
Spaceman
19
Years of Service
User Offline
Joined: 19th Aug 2004
Location: Germany / Adelebsen / Goettingen
Posted: 11th Dec 2005 02:23
hello???

Computers are humans too!
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 13th Dec 2005 02:21
Im afraid its going to be a long, cold winter before we see the light of u6 my friend...

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 13th Dec 2005 04:43
Or on a more hopeful possibility, maybe he's working so hard on it that he doesn't have time to read the forums.

Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 13th Dec 2005 09:52
Yeah thats what I meant, hopefully they are working on all these bugs, but I dont expect to see u6 for quite some time .

All you need is zeal
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 18th Dec 2005 22:53
I get the problem on upgrade 5.9 final.

I simply load an image ans try to make a memblock using it and obtain "cannot use an image correctly locked by system"



I have tried to add flag without success.

Why that bug is not yet "Confirmed" ?
Please moderators, confirm that bug to get it fixed for next upgrade.

All we have to decide is what to do with the time that is given to us.
Dejunai
18
Years of Service
User Offline
Joined: 19th Jul 2005
Location: Mentally: Manhattan; Physically: LA -doh
Posted: 11th Jan 2006 20:51
The example script in the HELP folder for MEMBLOCK

memblock2-example.dba


Obviously is intended to work as described in previous posts,
However the example crashes with an image lock error.
Wouldn't this mean that somewhere a bug has been introduced,
or that the implementation has changed and needs to be redocumented?

============ : Windows 2000 SP4+, 3.2GHz Hyperthreaded
-Dejunai ............: 2GB RAM, nVidia 6600 256MB AGP 8x
============ : AC'97 basic A-Bit Motherboard Audio ( drivers always Maintained )
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 28th Jan 2006 14:22
I get the error too. Confirm? Deny? Anything?

Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 29th Jan 2006 03:52
not till U6 bug week!

All you need is zeal
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 6th Feb 2006 14:48
They could still confirm it!

Why make sense when you could make brownies?
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 6th Feb 2006 16:02
I can also confirm (after tests) that it work with flag to 1.
but, I thinkg TGC may fix that problem using 1 of these 2 ways :

1 / Load image without flag must allow make memblock.

2 / Add a command to know if an image was loaded with flag to know if we can make a memblock from it.

All we have to decide is what to do with the time that is given to us.
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 6th Feb 2006 22:26
Or a message saying "Cannot create memblocks from mipmapped images. Please use texture flag",something like that.

Why make sense when you could make brownies?
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 9th Feb 2006 06:12
Ok, time for a confirmation, bug week has begun.

Solution - You should be able to make a memblock from any image (mipmaps or not). Just disregard the other mipmap levels if thats the case.

All you need is zeal
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 10th Feb 2006 04:23
Confirmity-Firm-Firm?

Why make sense when you could make brownies?
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 10th Feb 2006 23:51
K this is really getting insane.

Please just fix this guys, its clearly never going to get confirmed.

Or at least reject it! lol

All you need is zeal
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 12th Feb 2006 20:48
I have checke the source code to LOAD IMAGE and MAKE MEMBLOCK FROM IMAGE, and rechecked the latest DirectX documentation to see if there was a new way in which render targets and mipmap surfaces in video memory could be locked. I could not find any method of doing this at performance level, and the code required was a little long-winded to implement. I have attached code which produces the required memblock from any image loaded (parameter or no), which is really just a reflection of what I would have to do on the inside. The memblock command was never meant to handle video memory unlockable surfaces and textures, and so I am rejecting this bug as it really is an expansion of this commands functionality. You can find the best-case workaround in the source attachment:

"Small, smart, and running around the legs of dinosaurs to find enough food to survive, bedroom programmers aren't extinct after all "
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 12th Feb 2006 21:33
I have to say I'm very dissapointed in TGC on this one. Instead of adding extra functuality you tell us a workaround? First time I've had to experience some laziness from TGC but it surely is annoying.

Why make sense when you could make brownies?
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 12th Feb 2006 21:36 Edited at: 12th Feb 2006 22:11
Argg youre kidding me paste image? Thats slower than locking/unlocking the pixels...

If we cant get any other kind of workaround, we REALLY need you to add functionality to the set camera to image command to compensate. PLEASE look into this thread.. (mainly the whole alpha based on image color key)

http://forum.thegamecreators.com/?m=forum_view&t=71558&b=15

Of course there are a million other uses as well...

*edit... Wait I swear we used to be able to do this pre 5.8. Can anyone confirm?

All you need is zeal
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 14th Feb 2006 02:12
Quote: "In the past I have used MAKE MEMBLOCK FROM IMAGE on a mipmapped image and it didn't crash."


Bat can you remember what patch you were using? This is interesting news.

I dont see why it would even "look bad", I mean just ignore the mipmaps, grab the base resolution.

All you need is zeal
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jun 2006 11:24
Quote: "*edit... Wait I swear we used to be able to do this pre 5.8. Can anyone confirm?"


I can't quite confirm since I'm using 5.8 now, but I have previous snippets that used to work using memblocks and images that now receive that error message.

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike

Login to post a reply

Server time is: 2024-05-18 20:08:28
Your offset time is: 2024-05-18 20:08:28