Here is a screenshot of a non-theoretical, practical and working demo:
With script I alter QuickBase's file attachment control to only browse for images:
<input type="file" size="40" name="_fid_8" id="_fid_8" accept="image/*">
When an image is selected, it is previewed to the spot on the form indicated by "Image" and displayed in a
<canvas> item indicated by the spot on the form indicated by "Processed". Once the
<canvas> loads I automatically
flip and
rotate the
<canvas> and initiate the download of the processed image. Unfortunately I can't upload the processed image at this time because of my file storage quota.
However, to save the processed image all you have to do is call
canvas.toBlob() and submit the
blob using
FormData API.
While the image is in the
<canvas> it is possible to resize it, add a watermark or any other processing you desire. You can also extract any
EXIF data from the image and slot it into extra fields on the form.
BTW, the girl in the photo is named
Zoe and she is famous:
Know Your Meme ~ Disaster GirlIf you need this non-theoretical feature feel free to contact me off-world using the information in my profile:
https://getsatisfaction.com/people/dandiebolt