jkphl / iconizr

A PHP command line tool for converting SVG images to a set of CSS icons (SVG & PNG, single icons and / or CSS sprites) with support for image optimization and Sass output. Created by Joschi Kuphal (@jkphl), licensed under the terms of the MIT license
http://iconizr.com
MIT License
485 stars 36 forks source link

SVGs rescaled to 300px wide if greater than 300px #14

Closed psiphi75 closed 10 years ago

psiphi75 commented 10 years ago

Hi,

For some reason when I load a SVG (created in inkscape) to iconizr, then the resulting SVG has a maximum width of 300px. Even if the original width is greater than 300px. Although the vertical is scaled accordingly, this is not what I want.

Cheers, Simon

jkphl commented 10 years ago

Hi Simon,

thanks for your message. I assume that you're talking about the online version http://iconizr.com, right? I kindly ask you to read what's written on the page:

iconizr_300

Processing the icons can require lots of resources and time, mostly depending on the icon dimensions and especially when one applies a high level PNG optimization. To keep the service highly available to a wide audience (and as the server behind is not overly strong, unfortunately), I'm committed to making these restrictions.

I recommend installing iconizr and it's prerequisites on your local machine to get rid of all restrictions. Also, if it's just a one-off job, you may also send me the bunch of "oversized" icons and I'll convert them myself on my local machine for you.

I'd take the liberty to close this topic as an issue, but please feel free to contact me in case I can do anything further for you.

Cheers, Joschi

psiphi75 commented 10 years ago

Hi Joschi,

Thanks. Next time I need to read the manual. ;) In the end I have created the SVG sprite manually.

However, SVG is more dependant on size of the file, not resolution, and I do not require the PNGs. You could create an option to not create PNGs, this would also save your resources.

Thanks for your help. Iconizr is a cool tool.

Regards, Simon

jkphl commented 10 years ago

Hi Simon,

yeah, skipping the PNG fallbacks is a legitimate suggestion! I opened an issue for this (#15) and will address it soon. Historically, iconizr started as a SVG-to-PNG converter — being also an SVG sprite generator turned out to be a nice side effect. But you're right, some users might not need the PNGs altogether ...

Thanks again, cheers, Joschi

psiphi75 commented 10 years ago

By the way. I have just used the following SVG optimiser and it seems to work quite well, and is light on resources: http://libregraphicsworld.org/blog/entry/introducing-svg-cleaner

I had a problem with the "Apply Transform Matrices" filter, but every other filter worked fine.

Cheers, Simon

On 5 February 2014 22:12, Joschi Kuphal notifications@github.com wrote:

Hi Simon,

yeah, skipping the PNG fallbacks is a legitimate suggestion! I opened an issue for this (#15 https://github.com/jkphl/iconizr/issues/15) and will address it soon. Historically, iconizr started as a SVG-to-PNG converter -- being also an SVG sprite generator turned out to be a nice side effect. But you're right, some users might not need the PNGs altogether ...

Thanks again, cheers, Joschi

Reply to this email directly or view it on GitHubhttps://github.com/jkphl/iconizr/issues/14#issuecomment-34148792 .

jkphl commented 10 years ago

Thanks for this suggestion. The source code for this "SVG Cleaner" is obviously located here: https://github.com/RazrFalcon/SVGCleaner

iconizr uses either SVGO or Scour for cleaning the original SVG files. The online version sticks to Scour, as I experienced better results (= smaller files) with it.

I'll give SVG Cleaner a try and compare results as soon as I find some time (see #16).