Closed kavitakanojiya closed 9 years ago
@follmann ,
Image magick breaks down .ico file into multiple resolution supported files. So I tried to make a patch to support .ico to .png file. Here is the compare:
https://github.com/follmann/favicon_maker/compare/master...kavitakanojiya:master.
Can you take a look?
I tried to convert .ico file to .png file. Now I see for circle image, it cuts off the edges. Will you please shed light how to prevent this ?
Thanks
Hi Kavita, sorry for my delayed answer...
At first I thought support for ico generation was broken, but as I just checked it isn't. As for using ico-files as a template, this seems kind of backwards to me and I would rather not support it. ico is proprietary and quite limited format. I would rather suggest you use SVG or PNG as template files to achieve good results.
Thanks,
Andreas
@follmann , thanks for your reply. I went through the documentation for .ico files and it seems to be little complex, however I managed to convert .ico to .png files.
One observation: InputValidator validates .png and .ico but the specs covers .svg and .png formats. Seems this needs to be fixed if I look into codebase and specs. Makes sense only .svg and .png should be supported, even most of the external services doesnot support .ico file.
Otherwise, this works great. Keep up the good work.
Thanks for your inputs.
Hey @follmann ,
When I generate them from .png file, this generates files like
android-chrome-72x72.png
,android-chrome-96x96.png
, etc .I noticed some different behaviour while generating favicons out of .ico file. It generates files like
android-chrome-96x96-0.png
,android-chrome-96x96-1.png
,android-chrome-96x96-2.png
, etc. Hence, method#each_icon
lists file named asandroid-chrome-96x96.png
.Check this:
Am I missing anything to generate appropriate favicons out of .ico file ? I have initialized the code the way mentioned in Readme.
Here is the snippet:
` Dir.mktmpdir(Time.now.to_i.to_s) do |dir| FaviconMaker.generate do setup do template_dir File.dirname(file) output_dir dir end
`
Any suggestion will be helpful.
Thanks.