Platforms to show: All Mac Windows Linux Cross-Platform
PicturetoBinaryStringMBS(p as picture) as string Deprecated
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
global method | Graphics & Pictures | MBS Picture Plugin | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Deprecated. Please do not use for old projects and convert existing images into a new format, e.g. PNG.
The format of the binary encoded picture data:
+ 0 Kenn, PPIC for Packed Picture
+ 4 Length of whole block
+ 8 Width (BigEndian)
+12 Height (BigEndian)
+16 Depth (BigEndian, 32 for 32bit)
+20 Offset of the binary data. maybe 40.
+24 Reserved for future use. Should be 0.
+40 Pixel Data, packed R, G, B in one byte per Subpixel.
300x300 Pixels will make up 300*300+40 -> 270040 Bytes.
This method does not require Quicktime or any other OS Service, but it does no compression.
Does not handle mask or alpha channel.
May be a good way to store pictures crossplatform inside a database. As Valentina can do its own Zip based compression, this may be a wonderfull way to store pictures uncompressed (or lossless compressed) inside the database.
The returned string has the encoding set to binary (no encoding). If you want to concat the string with another you should check the encoding. If you don't handle that RB may convert the JPEG data to UTF8 (Unicode) which will destroy it.
Some examples using this global method:
Blog Entries
The items on this page are in the following plugins: MBS Picture Plugin.