开发者

PHP or CGI - Convert .ico to gif or png or jpg?

How do you convert a favicon.ico to a regular web-accessible graphics - gif, png, o开发者_运维技巧r jpg using PHP or C/C++/CGI?

  • Are there methods that do not require ImageMagick?


You cold use imagemagick. Eigther you use the native php extension or you use a php exec command (for a commandline command) and then get the transformed image or as last option you use imagemagick as a server and request the new image from a webadress.

There are other commandline tools available, but they are not as powerfull and easy to use as imagemagick (i.e. GD);


If your server doesn't have Imagick installed, you can use GD (the hard way). You can do a pixel-by-pixel mapping by using the following format for sniffing the actual bitmap: http://www.daubnet.com/en/file-format-ico


Use ImageMagick or one of its bindings.


Netpbm can handle all those formats and doesn't get nearly as much attention as it deserves.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜