Cannot generate image preview using Servicess:image |
I'm trying to implement this solutiion How do I convert a PDF document to a preview image in PHP? - Stack Overflow
Essentially the user says that is possible create a preview of a pdf based on this code: PHP Code: <?php so I tried to convert that code using the image service included in CodeIgniter 4: PHP Code: $im = \Config\Services::image('imagick'); and I got: The file is not a supported image type. how is that possible?
This has nothing to do with CodeIgniter.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
If using the ImageMagick library, you must set the path to the library on your server in app/Config/Images.php.
Note The ImageMagick handler does NOT require the imagick extension to be loaded on the server. As long as your script can access the library and can run exec() on the server, it should work. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-12-2021, 02:01 AM)InsiteFX Wrote: If using the ImageMagick library, you must set the path to the library on your server in app/Config/Images.php. Any idea about how to set this path? I feel like the documentation lacks this information.
This is the only thing I can find on it plus php.net links are in the bottom link.
How do I set the path in Apache for ImageMagick so I can run from PHP system()? What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |