Prev | Current Page 213 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

jpeg or .png)
We change our cover_photo field type from BLOB to MEDIUMBLOB to ensure
that we can upload photographs that are bigger than 65 KB to it. We then enter the
following attributes:
Here, the options are presented as width,height. If we omit the options, the default
values are 100,100. The thumbnail generation code preserves the original aspect
ratio of the image, so the values entered are the maximum width and height of the
generated image. We then upload a .jpeg file in a cell (using instructions from
Chapter 6). As a result, we get the following in Browse mode for this table:
MIME-Based Transformations
[ 244 ]
This thumbnail can be clicked to reveal the full-size photograph.
The thumbnail is not stored anywhere in MySQL, but generated each time
we go into Browse mode for this set of rows. On a double Xeon 3.2GHz
server, we commonly experience a generation rate of 6 JPEG images
per second.
For a .png file, we have to use image/png as the MIME type, and image/png: inline
as the transformation.
Another point to note: we have seen in Chapter 6, in section BLOB (Binary Large
Object) Fields that the $cfg['ShowBlob'] parameter is normally used to permit
or block the display of BLOB contents, but this parameter does not influence the
thumbnail's display??”it can be set to TRUE or FALSE.
Links to an Image
To get a link without thumbnails, we use the image/jpeg: link transformation.


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