Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
This post has been closed. You can still view previous posts, but you can't post any new replies.

Image Rendering Question

I have a question for the devs about how images are handled in Roll20. I'm guessing that when you copy an image to the game board via drag and drop and then make multiple copies of that image via copy/paste that all are referencing the same file. I would like to know if each image is taking up video memory on Roll20 to render on the canvas, or if it's just that one image referenced multiple times like it would be on a web page. Asking because it seems like repeating dungeon elements (same picture copied multiple times) would be a way to keep a page rendering fast if there's only one call per sprite referenced on screen. If this has been asked elsewhere, please direct me to the correct thread :)
1436471245
The Aaron
Roll20 Production Team
API Scripter
Copy/pasted images will only have one copy of the image data in memory (you can look at the Developer Tools in your browser for this). There will be overhead from multiple placement locations on the canvas. Dragging multiple copies of an image into the VTT will duplicate the image in your Library, which will lead to duplication of the image data in memory. This isn't really a Roll20 specific thing, so reading up on HTML5 Canvas would give you good information regarding the specifics of the technology.
Thanks for the explanation about image copy and canvas rendering. This explains why I have multiple tokens in my library that I couldn't explain how they got there. I will read up on HTML Canvas. This stuff is fascinating to me.