Page 1 of 1

[Implemented] SaveImageToMemory()

Posted: Sun Oct 07, 2007 8:31 pm
by Joakim Christiansen
Implemented as EncodeImage()

Just like our SaveImage() function, but saving it to the selected memory buffer and then return how much data was written. And it should support the image plugins...
:D
Wouldn't be hard would it?

Posted: Sun Oct 07, 2007 10:22 pm
by DoubleDutch
I asked for this a while back. I think it should automatically allocate the memory and return the location (memory id). You can then use the memory commands to find out how much memory was taken up.

Posted: Sun Oct 07, 2007 10:44 pm
by Trond
I assume you do know you can this with api and a named pipe?

Posted: Mon Oct 08, 2007 12:16 am
by DoubleDutch
Yes, but it would be nice as part of the command set for all versions. :)

Posted: Mon Oct 08, 2007 3:05 am
by Joakim Christiansen
Trond wrote:I assume you do know you can this with api and a named pipe?
I suspected that, never used a pipe though. But yeah, as DoubleDutch says; it would be nice to have in PB.

Posted: Mon Oct 08, 2007 7:05 am
by Deeem2031
Some time ago I posted this code to save a image to memory via pipes: http://www.purebasic.fr/english/viewtop ... 15&start=0

Posted: Mon Mar 10, 2008 7:15 pm
by Joakim Christiansen
Okay, I'll use the pipe method for now then. But it would be nice if they wrote this on their todo list since it's very simple to add.

Posted: Sat Aug 23, 2008 7:04 pm
by Polo
Any chances we can access to the image buffer natively one day :) ?

(I know we can do this through API).

Posted: Fri Sep 26, 2008 7:24 pm
by LCD
In the Code Archive (CAV) I found the CopyImageToMemory() and CopyMemoryToImage() Procedures which are both very useful, sadly they will work only in Windows (making porting to other systems impossible), so I'm voting too for native support in PureBasic for Linux and MacOS. This would be a nice replacement for Plotting on Image which is a bit Slow.

Posted: Fri Sep 26, 2008 8:27 pm
by Mistrel

Posted: Fri Sep 26, 2008 11:55 pm
by LCD
Thanks, but thats Windows only! Not Linux and not MacOS.

Posted: Sat Sep 27, 2008 12:19 am
by Polo
Please stop posting links of workarounds in a feature request, it's just nonsense.
I'd like it native, because even with those workarounds, we lose a lot of speed with useless memory manipulation.