Userlib with Purebasic

Blitz3D Forums/Blitz3D Programming/Userlib with Purebasic

REDi(Posted 2004) [#1]
Does any body know how to pass an image to a purebasic Dll, I assume I could grab the image using the CatchImage() command, but how can I get the memory address of the image from blitz? Any ideas?

Thanx for your time.


Kanati(Posted 2004) [#2]
you can't.

Best you can do is poke all the bits into a bank and pass the bank.


Dreamora(Posted 2004) [#3]
even easier: just push the filename into the bank and transfer it so it can be read in at purebasic itself :)


REDi(Posted 2004) [#4]
@Dreamora, Nice idea, but why use a bank when you can pass a string ;)

Really I just need to be able to peek and poke the image buffer from inside the dll, I have tried a number of different things, but no joy :(


Kanati(Posted 2004) [#5]
don't have access to the graphics pipeline. We've been requesting that for a long time.

In my printer library I do just what dreamora suggests and pass a filename of a graphic to be added to the page. But if you want to pass it in memory you'll need to pass a bank.


Perturbatio(Posted 2004) [#6]
you might find something here that will interest you


REDi(Posted 2004) [#7]
Thanx Perturbatio, I've been looking at that, it must be possible to poke the buffer but I just can't find where the RGB bytes are.


TartanTangerine (was Indiepath)(Posted 2004) [#8]
I managed to pass an image to PB by putting the RBG values in a bank and passing the bank. In fact I had to create two banks, the second bank is the one I return from the .dll with the result in it.

And guess what...... PB was slower than Blitz when working on images. Gutted! :(