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.

  1. The object is used only once,
  2. Multiple use of the same object, for example an icon on the administrator,
  3. 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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -