avataaars-generator icon indicating copy to clipboard operation
avataaars-generator copied to clipboard

PNG from url

Open prathamApp opened this issue 5 years ago • 4 comments

Hello guys, Thanks a lot for the quick response and fixing of the error. I just had a question regarding the url. Can we get the png image from the url inspite of svg's so that It will be easier for me to load the image direct in my app coz there are many custom methods that Ihave to write for loading svg's and resizing of those is also a hard part. Or is there any way to get the png image from url without downloading it separately. Thank you.

prathamApp avatar Aug 30 '18 03:08 prathamApp

Thanks for the feedbacks. That's a good idea, I will think about it.

fangpenlin avatar Sep 10 '18 17:09 fangpenlin

I would really appreciate it as well!!

FZ-Iskandar avatar Oct 04 '18 10:10 FZ-Iskandar

@fangpenlin is there currently any possibility to return a PNG from a URL directly? Attempting to display an avatar in an environment that breaks on complex SVGs and converting from SVG to PNG is less than perfect 😬

Update: looking at the code I see you're using an HTML canvas to convert the SVG into PNG. I attempted the same on my site but due to CORS restrictions (and it generally being a bad idea) I'm not able to convert a remote resource into a local resource like that. So any way you could offer this via URL would be wonderful!

benjibee avatar Dec 08 '20 10:12 benjibee

Returning a png would be awesome! Swift doesn't like SVG so much...

netgfx avatar Dec 21 '20 16:12 netgfx