Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to change image format/extension?

Is it possible to change format/extension of file using Adapter/Imagick or Adapter/Gd? I want to convert .png to .jpg, but I don't see such function in Phalcon docs? Do I need execute that with poor Imagick functions?



42.3k
Accepted
answer
edited Sep '15

https://docs.phalconphp.com/en/latest/api/Phalcon_Image_Adapter.html

render($ext, $quality) you can set it manually with $ext

save($file, $quality) format is automatically determined from filename

https://github.com/phalcon/cphalcon/blob/2.0.x/phalcon/image/adapter/imagick.zep#L631