invatar icon indicating copy to clipboard operation
invatar copied to clipboard

Raster formats support

Open jungornti opened this issue 10 years ago • 5 comments

Is it planned to support jpg / png?

jungornti avatar Oct 09 '15 06:10 jungornti

Not really.

  1. Rastering a SVG on the fly is a very expensive operation, and images should be served very-very fast.
  2. The main purpose of this project is for people to use the SVG response within their HTML (img, background-image) pages. Downloading, saving, or any other cases IMHO are not very popular.

Would be interested in other people's opinions and suggestions, though.

Bekt avatar Oct 09 '15 19:10 Bekt

Fair enough, but why use the .jpg extension. It's just plain confusing

ndastur avatar May 24 '17 16:05 ndastur

@ndastur I can see that and yea I agree. What do you think makes sense? We can add more extensions/routes here: https://github.com/Bekt/invatar/blob/master/invatar/app.py#L22

Bekt avatar May 24 '17 17:05 Bekt

I'd have thought just route to .svg as it's an svg file ??

ndastur avatar May 24 '17 22:05 ndastur

Also jpg output would be amazing. Maybe this SO post would help implement it? https://stackoverflow.com/questions/2932408/server-side-svg-to-png-or-some-other-image-format-in-python

ndastur avatar May 24 '17 22:05 ndastur