Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.79k stars 1.5k forks source link

ValueError: application/pdf is not a valid backing value for enum Intervention\Image\MediaType in >= 3.7.1 #1373

Closed Temepest74 closed 2 weeks ago

Temepest74 commented 2 weeks ago

I am using the laravel package integration. As soon as I updated to 3.7.1 my tests (phpunit) where I read some pdf files with Image::read() started failing with the error from title. 3.7.0 works just fine

olivervogel commented 2 weeks ago

I can confirm that the ValueError occurs since 3.7.1 for PDF files. However, PDF is not an officially supported format and only works with the Imagick driver by a coincidence. I will think about how to deal with this.

olivervogel commented 2 weeks ago

As of version 3.7.2 the previous behavior is again possible.

I would like to point out that PDF is not actually one of the formats supported by this library and that I recommend using Imagick directly.