dbushell / grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS
MIT License
76 stars 37 forks source link

Double size (@2x) #10

Open nicooprat opened 10 years ago

nicooprat commented 10 years ago

Would be great to have an option to specify if we want (or not) a second export at double size for hi-res displays. A suffix option would be even greater (@2x by default I guess).

Btw, thanks for your plugin, saved me hours of work :)

fliptheweb commented 10 years ago

@nicooprat Hm, why you want to use a @2x png when you could use svg? I think all browsers on hi-res display could show svg ;)

nicooprat commented 10 years ago

You're certainly right, but I came across a case for a client when I needed to double the size of images for big screens... It's a bit complicated I know.

But I also thought it could be useful for mobile app developers for example that could have one SVG file as source, and use this grunt plugin to generate all PNG needed from it.

Need more feedbacks from other people I guess.

(One note though : the screen is hi-res, but the browser is completely independent. One could use IE8 with Virtualbox on a MBPr :) I don't know how it's supposed to work in this case...!)

jmalonzo commented 8 years ago

Hi! I think this feature will become more useful as sites start to have their own Web app manifest, as Android, for example, don't support SVGs in the home screen (yet) and Chrome expects a PNG in the manifest.