Usage
To use dImaging, you must first have it installed somewhere in your public web directory.
Thumbnail of an Image
To get a thumbnail of a required image, you need to call the script thumb.php and supply the following three parameters:
url: This is the url of the image file relative to the file; thumb.php
dimension: Which of the dimensions should be restricted to the specified size. Here is a list of possible values.
- w: restrict the width.
- h: restrict the height.
- m: restrict the largest dimension (width or height)
size: The unit size in pixels that the specified dimension has to be.
quality: The percentage value of the quality of the JPEG. If a quality is not specified, the default of 75% is used.
Examples
Here are some examples of the effects of changing the dimension, the size is set out at 100 pixels for all images but the restriction is applied to different dimensions. Hover over each image to see the url and query string used.
dimension=w
<img src="thumb.php?url=portrait01.jpg&dimension=w&size=100">
<img src="thumb.php?url=landscape02.jpg&dimension=w&size=100">
dimension=h
<img src="thumb.php?url=portrait01.jpg&dimension=h&size=100">
<img src="thumb.php?url=landscape02.jpg&dimension=h&size=100">
dimension=m
<img src="thumb.php?url=portrait01.jpg&dimension=m&size=100">
<img src="thumb.php?url=landscape02.jpg&dimension=m&size=100">

