While making a html5 application/website, for such cases as an image gallery, where a large number of images are displayed sequentially or at the same time in the browser, is the use of the canvas element justified?
As long as we are only talking about presenting an image, is there any point in using a canvas and drawing the image on it instead of using the DOM element < img > tag?
There will also be some image manipulation, like CSS3 transformations/moving/scaling/zooming and gesture recognition (drag, touch/tap, maybe pinch, etc.) which, as far as I know, are applicable to both the canvas and the img tags.
It would also be important to keep things as much “html5”-ish as possible and also taking performance into account.
For example, it would matter if in the future the canvas element will be more and more used and optimized by the browsers and it would also matter if for the time being the < img > is much faster.
Are there any resources/studies regarding this particular aspect?
UseCanvas = NeedCanvas ? true : false
You really don’t need canvas for this operation, and it will take longer to develop with canvas as it’s a lot more complicated.
Don’t use HTML5 technology for the sake of using HTML5 technology. When you want to start warping the images and having the user draw on them so you can export/save, that’s where you need canvas.