开发者

How to ensure all output images are in jpg format when using codeigniter's Image Manipulation Class?

Of course I could reconvert the images from what ever format they are saved in to jpg using the php default functions, but is not it possible using the codeigniter class?

I am using http://codeigniter.c开发者_C百科om/user_guide/libraries/image_lib.html to resize images to create thumbnails. Sadly even if I set in my config $config['new_image'] = 'somepath/filename.jpg' the output format is in the same format as the input format.

The image file will be named like specified but not converted to jpg. How to do this using the codeigniter librarys?

Thank you.


Try to modify/extend CI's library to make use of imagecreatefromjpeg which returns FALSE on error. Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜