Create images with UNO

Hey,

I was wondering if someone could give me some guide how to create images in UNO so that they could be saved, shared and sent to server. Saving, sharing and sending to server is covered by the documentation and examples, but they all assume I have the actual image file available all ready, for example by taking a picture.

I would like to be able to take a picture, but also create a custom image and then manipulate it in Uno using draw calls and eventually share it to the World.

So is there a way to turn framebuffer to actual image file in Uno/Fuse? Then pass it to JS as ‘frozen JavaScript Image object’ ?

Hi,

as an example, some custom drawing seems to have been done in this repo. If that doesn’t help, it might make sense to look at fuselibs-public, since it probably does include the code you’re after at some place.

Hope this helps!

Bolav’s code looked promising but android build gives errors

If you tell us what the errors are, it might be easier to help you resolve them…

_root.SavePanel.cpp:264:26: error: use of undeclared identifier 'uStringToXliString'
                      uImage::Png::Save(uStringToXliString(path), bmp);
                                        ^

Try adding [Require("Source.Include", "Uno/Support.h")] together with the other similar-statements

Erik Faye-Lund wrote:

Try adding [Require("Source.Include", "Uno/Support.h")] together with the other similar-statements

I can confirm that fixes the issue with the Android build.