I would like to create a PHP script that convert a png file to an ico file. Is it possible to do it just with PHP ? How ?
Thanks !!!
Take any PNG file and rename it with a . ico extension. Really, that's all it is. See also The evolution of the ICO file format, part 4: PNG images.
No. An ICO is actually a specialized file format that contains a collection of images at potentially many different sizes and color depths. A png is a specific image.
This seems to suggest Imagick can do this.
Otherwise, you could do the conversion on the server using an external tool and server the .ico file. Tools to achieve this have been analyzed in Stack Overflow before (well, doing the opposite transformation, but I bet most of that software can do what you need).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With