I'm not sure, but is it possible to write image data as a string and manipulate the string and then translate it back into the image before showing the resulting image?
This does not require drawing on canvas, and loading images as a string instead of an image. However, it would be associated with some complex and possibly difficult to properly manipulate strings to make sure that the image data is translated correctly and to manipulate pixels more efficiently.
This also means that the line is likely to be very long for large images, so it can take up more memory than the canvas, and potentially it may be necessary to split it into several lines. In return, it can be faster than drawing on canvas, especially with multiple lines, if you only need to manipulate part of the image.
I do not experience image manipulation, but theoretically there is no reason that the file data could not be written to a string. This is simply, again, going to make a very long line and have a possible RAM effect because of this, because the line can take up more RAM than the image file itself. But it will be faster loading, since it should not process data as much as drawing on canvas.
Raymond
source share