Userlib with Purebasic
Blitz3D Forums/Blitz3D Programming/Userlib with Purebasic
| ||
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. |
| ||
you can't. Best you can do is poke all the bits into a bank and pass the bank. |
| ||
even easier: just push the filename into the bank and transfer it so it can be read in at purebasic itself :) |
| ||
@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 :( |
| ||
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. |
| ||
you might find something here that will interest you |
| ||
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. |
| ||
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! :( |