javascript - Canvas vs. img - performance -
I tried to find some relevant sources of it and found nothing.
So, my questions are quite simple. Is Canvas Faster than IMG? I will use the object as image (PNG, GIF) or canvas.
- The object is used only once,
- Multiple use of the same object, for example an icon on the administrator,
- Multiple use, for example the companies logo.
I am interested in memory usage, performance in the browser and the speed of loading.
Edit # 1: The canvas is designed by JS and it will be similar to the image in the IMAG tag.
no,
img fast, easy and
canvas is used to show an image
img tag , so if you have to do this, a
img Use tags. Multiple uses should not make any difference because the image will be downloaded only once.
If you need some animation or interactivity, then it's time to consider
canvas . / div>
Comments
Post a Comment