How can I load an image into the sketch using the loadImage() function with an image URI, such as:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
I've tried by doing this:
- PImage im;
- void setup(){
- String uri = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
- im = loadImage(uri);
- noLoop();
- }
- void draw(){
- image(im,0,0);
- }
without being successful...
It would be great if someone could provide me with a small example
Thanks!
1