ImageCompiler is a small Desktop only program written in Basic4ppc that will embed images into a .dll
Both .Net Framework 2.0 and .Net CompactFramework 2.0 are required.
The resulting library can be used for the Device and Desktop, a Desktop only option is included.
It will contain two methods.
GetBitmap - returns a standard .Net Bitmap
GetStream - returns the raw data as a Stream
For all of the images embedded there will be a property that gets the resource name as a string.
ImageCompiler.GetBitmap(ImageCompiler.ImageName) - will return a Bitmap
ImageCompiler.GetStream(ImageCompiler.ImageName) - will return a Stream
This can be used with my http://www.b4x.com/forum/additional-libraries/4952-alpha-image-device.html library on the Device or Desktop
The program source is available and has comments on how to draw to an Image object or to an AlphaImage object.
It is possible to embed any type of file into the library.
I haven't tested it but, the BinaryFile library should be able to read the Stream data or write it to a file.
Edit: Yes it does work with any file and with BinaryFile library.
Both .Net Framework 2.0 and .Net CompactFramework 2.0 are required.
The resulting library can be used for the Device and Desktop, a Desktop only option is included.
It will contain two methods.
GetBitmap - returns a standard .Net Bitmap
GetStream - returns the raw data as a Stream
For all of the images embedded there will be a property that gets the resource name as a string.
ImageCompiler.GetBitmap(ImageCompiler.ImageName) - will return a Bitmap
ImageCompiler.GetStream(ImageCompiler.ImageName) - will return a Stream
This can be used with my http://www.b4x.com/forum/additional-libraries/4952-alpha-image-device.html library on the Device or Desktop
The program source is available and has comments on how to draw to an Image object or to an AlphaImage object.
It is possible to embed any type of file into the library.
I haven't tested it but, the BinaryFile library should be able to read the Stream data or write it to a file.
Edit: Yes it does work with any file and with BinaryFile library.
Attachments
Last edited: