thephpleague / glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.
http://glide.thephpleague.com
MIT License
2.55k stars 198 forks source link

Saving TIFF images #344

Closed Synchro closed 2 years ago

Synchro commented 2 years ago

I'm using Glide through spatie/image, and I need to be able to save TIFF format images. Having found #149 which said that all I needed to do was use the imagick driver instead of gd (because imagick supports TIFF and gd does not), I switched to imagick. I was then a bit mystified to find that while it produced files with a .tiff extension, they actually contain JPEG data.

I tracked this down to this code, which restricts the available output formats, but also makes the output default to JPEG data without changing the filename, which explains my symptoms. Adding TIFF to that array allows it to work, but I can't see how it could work without it, making the answer to that issue a mystery!

PR incoming...