I need to load an external image into a sprite and allow the user to resize and crop it. I got that working pretty well with the FileChooser, DrawingCanvas, and BinaryData. But if the original image is really big the final result looks terrible.
So, I went looking for a javascript routine that can resize an image without all the artifacts, and I found one that does a great job! I can have the script load an image and resize it, and load that into the DrawingCanvas object. But I can't find a way to send the image from Construct to the script...
I can load an image into a sprite, paste that into the DrawingCanvas, and save that to BinaryData, and access the BinaryData object in the script, but I don't know how to load that into img.src or an ImageData variable that the script can work with.
Is there a getImagePixelData (opposite of loadImagePixelData) for the DrawingCanvas?
Anyone know how to get image data in the BinaryData object loaded into an img element?
https://www.rieperts.com/games/forum/resize.c3p