follmann / favicon_maker

Create favicon files in various sizes from a base image for ruby projects
MIT License
70 stars 7 forks source link

Allow aspect ratio change #12

Closed Arcovion closed 10 years ago

Arcovion commented 10 years ago

Centers image on a transparent background, doesn't stretch the original image.

follmann commented 10 years ago

Thanks! Will review it in detail tonight. Plus a visual test. Or actually could you add a test case for this? Maybe temporarily get rid of the cleanup in the after callback to check what you get. I am still not sure how I will go about testing the actual file content automatically, besides the very superficial test that a file has been written.

Arcovion commented 10 years ago

Ruby stdlib has Digest::MD5 for checking if files are the same, could also be used to avoid generating new icons when it's not necessary. I've been testing this patch a lot and it seems to work completely but I've stumbled across another error (unrelated to this patch) which I'll make an issue for in a sec.

follmann commented 10 years ago

The problem is that in order to compare the files, the icon needs to be generated in the first place.

Arcovion commented 10 years ago

Mm, you could have a cache folder like sass/bundler have, but that's probably daft for something that will only shave 10s off the build time and a bit of console spam. Okay for testing though