I have been trying to find a method to getting an image’s width, height, and all the individual pixel colors.
Firstly, I tried a Lua PNG library, however as you can guess, it only works for PNGs, and not even all PNGs work.
I then thought that the actual image url could correlate with the asset Id, however I have not found a connection between the two.
At this point I was getting desperate and realized I could try Web scrapping. However, I don’t know if it is appropriate and doesn’t go against ToS, because all I am doing is getting an Id, open the library page (
"https://www.roblox.com/library/" + imageId), then get the image url from ("#AssetThumbnail .thumbnail-span img").src, then sending this back to the Roblox experience.
ImageId (Lua server) -> ImageId (JS) -> "https://www.roblox.com/library/" + ImageId (php) -> getContext2d /*or a different method*/ (JS) -> json.stringify (JS) -> json decode (Lua server)
If this case of web scrapping is not allowed or there is an alternative, please let me know!
TL;DR: I need a method of getting image data (width, height, colors, etc.) from an imageId, the only method I could think of was Web Scrapping, is there another method, and is web scrapping against ToS?
Thanks in advance.