Ask HN: Serving Vector Images Via Web API?

https://news.ycombinator.com/item?id=5273124
by bsmith • 13 years ago
2 3 13 years ago

So, sometimes I need many different sizes of the same vector image on a site (i.e. logo). But saving multiple versions for web from Photoshop is a pain in the ass--especially when a year later you need to change the size of the logo and have to go find the PSD again.

How about keeping vector images in a folder somewhere on a webserver in EPS format or the like, and then providing an API that would let you specify the size and image format in the URL, like so:

example.com/vectors/logo.png?width=100

You could set up caching and then everything would be dandy--just change the URL to get a different size. I think this would be great for icons, logos, etc.

I found something similar (http://imageresizing.net/) that requires running a .NET server, but I was wondering if there were other tools out there that did something like this? I've seen approaches that scale an existing raster image, but I like the vector solution better, especially if a pixel-fitting algorithm could be applied (see http://dcurt.is/pixel-fitting). I also tend not to like the results from image-resizing algorithms at smaller sizes.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com