can anybody recommend a script which creates Thumbnails with imagemagick? All I could found were too old. It has to run with php5 and on a newer linux server.
It is important, that it uses imagemagick and not GD Lib. I already know timthumb, but it uses GD lib.
Related
When I want to install the CMS TYPO3, following problems get detected:
PHP GD library true color support broken
GD is loaded, but calling imagecreatetruecolor() fails. This must be fixed, TYPO3 CMS won't work well otherwise.
PHP GD library gif support broken
GD is loaded, but calling imagecreatefromgif() fails. This must be fixed, TYPO3 CMS won't work well otherwise.
PHP GD library png support broken
GD is compiled with png support, but calling imagecreatefrompng() fails. Check your environment and fix it, png in GD lib is important for TYPO3 CMS to work properly.
When I search for PHP GD2 in my apache server I can only find GD without the 2 - ist this a problem?
There are also some yellow colored problems - do I also have to fix these?
I had the same problem when running the latest wersion of XAMPP as it include PHP v8.
I installed an older version of XAMPP with php v 7.4.13 and the problem seems gone.
is it possible to check the php imagick extension for ghostscript support?
for example if it is turned on / off, the ghostscript version used, etc.
which possibilities are there to get additional ghostscript / pdf details?
the only thing i've found so far is this (version of imagick lib itself):
http://php.net/manual/en/imagick.getversion.php
ps: no system calls are allowed (e.g. exec) from within php
I don't know much about imagick, but some things about imagemagick. My guess is that by reading this answer related to imagemagick could help you with imagick as well:
convert -list delegate | grep -Ei '(PDF|PS|EPS)'
(convert is one of the CLI utilities which are part of imagemagick.)
I am trying to use Codeigniter's image manipulation class which of course requires a php image library.
I know I have gd library enabled on my server from running phpinfo();
However, I need to specify the path to the image library in codeigniter, and I don't know where it is installed! The server is under someone else's jurisdiction, so is there any way at all to find out where the gd library is installed without using the command line? It is a linux server.
Thanks.
GD is compiled with PHP, and is used internally, there is no need to supply a path for GD what so ever, on CI's Manual it states:
library_path : Sets the server path to your ImageMagick or NetPBM library. If you use either of those libraries you must supply the path.
Hint: you are not using ImageMagick or NetPBM
If you mean ImageMagick, you can locate the binaries you can try the following command:
locate imagemagick
but they are usually located in /usr/bin or /usr/X11R6/bin/
did you try phpinfo();
you will get the path to where php installed.
if you can access server
try to search for gd.so
http://www.linuxquestions.org/questions/linux-newbie-8/gd-library-path-145032/
http://php.net/manual/en/image.installation.php
I like to open a Windows bitmap file within php.
I found some piece of code (imagecreatefrombmp), that converts a bmp to png.
But that code is in plain php and to slow.
My images have a size around 1000x2000 pixels.
gdlib doesn't open bmp files.
IMagick to complicated to compile and i don't find windows binaries that work with my php.
Additional i like to open that bmp from a string.
it is streamed from a db.
I also need to do some rotations (0, 90, 180, 270) and some cropping.
Finally i like to save it to tiff or png file (or string).
But primary problem, how to open a bmp file?
plattform:
php 5.2 (vc6,ts) on Windows Cli and Apache 2.2 Module
zend framework 1.10
You can find precompiled gmagick PHP extension for Windows at valokuva site. The file is named php_gmagick_ts.dll.
The trick is that these are built using VC9 compiler so you will need VC9 version of Apache and PHP as well. If you plan to install PHP as a module, you will need a thread safe (ts) version of gmagick and PHP. You can get Apache built using VC9 from apachelounge, file named httpd-2.2.14-win32-x86-ssl.zip and PHP from PHP web site, file named php-5.3.1-Win32-VC9-x86.msi
gmagick code samples are available in the PHP documentation or in great tutorial at Zend DevZone.
To see all links for this answer go to http://www.google.com/notebook/public/11284522948259357138/BDQo5QwoQqbC67p4i
Enjoy!
I'm working on a package which includes rescaling of images in PHP. For image rescaling, PHP has the GD and ImageMagick libraries. Are those likely to be part of a given client's PHP install already?
Is there a "default" install of PHP, for that matter? By default, are either GD or ImageMagick included?
If neither is installed, should I have some sort of horrible fallback position of reading, rescaling, and saving GIFs, JPGs, and PNGs, or is it simple to add GD or ImageMagick to an existing install?
i can't remember when i've last seen a lamp hosting provider without GD. the imagemagick extension is not that widespread. if they run their server themself, they really should be able to activate one of it or both. in your place i'd build the full functionality with GD and a (probably reduced) imagemagick fallback. if they got neither, show them the basic concepts of the wheel and/or fire, they should be grateful.
PS: i encountered providers that deactivated certain GD functions (computationally too intensive on a shared hosting environment), like imagerotate and imagefilter.
GD is the easiet library to include in php.. it is "only" an extension, mainly included in php packages... the only operation needed is to activate the extension.
Regarding ImageMagik, it is more complecated, since the php imageMagik library is only an interface for the image magik software.
Using imageMagik require both software and php library installed
It is reasonable to expect the client to have the capability or an understanding of how to add the library. Are you selling software or servers maintenance?
If you're going for the whole "ease of use" angle, you'll want to package php with your app (and GD installed already), of which I'm not sure the legality. (but there's probably some way to get it done)
90% GD - 10% ImageMagick
Windows - Yes
Linux/MAC - No (but fairly easy to install)