Prev | Current Page 212 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"


Setting the $cfg['GD2Available'] parameter in config.inc.php to its default value,
'auto' indicates that a detection of the library's presence and version is needed.
If we know that the GD2 library is available, setting $cfg['GD2Available']
to yes will make execution quicker. If the GD2 library is not available, you are
recommended to set this parameter to no.
To find out which GD2 library we have on the server, we can go to phpMyAdmin's
Home page, and click Show PHP information. If this link is not present, we have to
set the $cfg['ShowPhpInfo'] parameter to true. We then look for a section titled
gd and verify which version is identified.
The JPEG and PNG Libraries
Our PHP server needs to have support for JPEG and PNG images if we or our users
want to generate thumbnails for those types of images. For more details, please refer
to http://php.net/manual/en/ref.image.php.
Chapter 16
[ 243 ]
Memory Limits
On some PHP servers, the default value in php.ini for memory_limit is 8 MB. This
is too low for correct image manipulation. For example, in one test, a value of 11 MB
in memory_limit was needed to generate the thumbnail from a 300 KB JPEG image.
Examples of Transformations
We will now discuss a few transformation examples. We will start by changing the
field type of our cover_photo field.
Clickable Thumbnail (.


Pages:
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224