In an old program I am updating I use to use PictureToJPEGStringMBS in the process of saving a graphic that was loaded along with my program data in the one file.
As I no longer have a licence for MBS is there a XOJO was to do this?
In an old program I am updating I use to use PictureToJPEGStringMBS in the process of saving a graphic that was loaded along with my program data in the one file.
As I no longer have a licence for MBS is there a XOJO was to do this?
MBS licences do not expire as long as you don’t change the plugins.
You can push and pull image data to a memoryblock using GetData and FromData
With the data in a memoryblock you could then turn the memoryblock into a string using EncodeBase64 and get it back using DecodeBase64
you might consider changing your file into a ‘bundle’, which holds individual files, if you are on a Mac
Or saving your files in a zip file
Public Function PictureToString(p as picture) as string
'// Convert picture to String
If p=Nil Then Return ""
Return EncodeBase64(p.GetData(Picture.FormatPNG),0)
End Function
or for jpeg
Return EncodeBase64(p.GetData(Picture.FormatJPEG))
Thanks Axel and Jeff (I had updated MBS plugin to match latest Xojo)