Skip to content

Commit 1d5eff2

Browse files
author
jools
committed
Merge commit '9bd525c9bf47faff7250df817ede3cd7814f39eb' into HEAD
2 parents af1937c + b95d21d commit 1d5eff2

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

manual/en-US/chapters/packages/image.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The constructor takes a single optional `$source` parameter. This argument can b
1616
- A string containing a valid, absolute path to an image
1717

1818
If you choose the first option, the class sets the protected property `$handle` to the provided image resource.
19-
2019
If you choose the second option, the class will call the `loadFile` method, passing along the `$source` parameter.
2120

2221
```php
@@ -46,10 +45,11 @@ Since Platform version 12.3, there is a new `destroy()` method that get's called
4645

4746
#### The `resize` method
4847
__Accepted Parameters__
49-
* `$width`: The width of the resized image in pixels or a percentage.
50-
* `$height`: The height of the resized image in pixels or a percentage.
51-
* `$createNew`: If true the current image will be cloned, resized and returned; else the current image will be resized and returned.
52-
* `$scaleMethod`: Which method to use for scaling
48+
49+
- `$width`: The width of the resized image in pixels or a percentage.
50+
- `$height`: The height of the resized image in pixels or a percentage.
51+
- `$createNew`: If true the current image will be cloned, resized and returned; else the current image will be resized and returned.
52+
- `$scaleMethod`: Which method to use for scaling
5353

5454
Example: Using `JImage::resize()` to generate a resized image.
5555

@@ -68,11 +68,12 @@ $image->toFile(JPATH_SITE . '/tmp/bar_resized.png');
6868

6969
#### The `crop` method
7070
__Accepted Parameters__
71-
* `$width`: The width of the image section to crop in pixels or a percentage.
72-
* `$height`: The height of the image section to crop in pixels or a percentage.
73-
* `$left`: The number of pixels from the left to start cropping.
74-
* `$top`: The number of pixels from the top to start cropping.
75-
* `$createNew`: If true the current image will be cloned, cropped and returned; else the current image will be cropped and returned.
71+
72+
- `$width`: The width of the image section to crop in pixels or a percentage.
73+
- `$height`: The height of the image section to crop in pixels or a percentage.
74+
- `$left`: The number of pixels from the left to start cropping.
75+
- `$top`: The number of pixels from the top to start cropping.
76+
- `$createNew`: If true the current image will be cloned, cropped and returned; else the current image will be cropped and returned.
7677

7778
Example: Using `JImage::crop()` to generate a cropped image.
7879

@@ -90,9 +91,10 @@ $image->toFile(JPATH_SITE . '/tmp/bar_cropped.png');
9091

9192
#### The `createThumbs` method
9293
__Accepted Parameters__
93-
* `$thumbsizes`: String or array of strings. Example: $thumbSizes = array('150x75','250x150');
94-
* `$creationMethod`: See __Resize Methods__ below.
95-
* `$thumbsFolder`: Destination for thumbnails. Passing null generates a thumbs folder in the loaded image's containing folder.
94+
95+
- `$thumbsizes`: String or array of strings. Example: $thumbSizes = array('150x75','250x150');
96+
- `$creationMethod`: See __Resize Methods__ below.
97+
- `$thumbsFolder`: Destination for thumbnails. Passing null generates a thumbs folder in the loaded image's containing folder.
9698

9799
Example: Using `JImage::createThumbs()` to generate thumbnails of an image.
98100

@@ -115,7 +117,7 @@ In this example, we use the `createThumbs` method of `JImage`. This method takes
115117
The `resize`, `createThumbs` and `generateThumbs` methods take an optional parameter that defines what method to use when scaling an image.
116118
This parameter can be one of the following:
117119

118-
* `JImage::SCALE_FILL` - Gives you a thumbnail of the exact size, stretched or squished to fit the parameters.
119-
* `JImage::SCALE_INSIDE` - Fits your thumbnail within your given parameters. It will not be any taller or wider than the size passed, whichever is larger.
120-
* `JImage::SCALE_OUTSIDE` - Fits your thumbnail to the given parameters. It will be as tall or as wide as the size passed, whichever is smaller.
121-
* `JImage::CROP` - Gives you a thumbnail of the exact size, cropped from the center of the full sized image.
120+
- `JImage::SCALE_FILL` - Gives you a thumbnail of the exact size, stretched or squished to fit the parameters.
121+
- `JImage::SCALE_INSIDE` - Fits your thumbnail within your given parameters. It will not be any taller or wider than the size passed, whichever is larger.
122+
- `JImage::SCALE_OUTSIDE` - Fits your thumbnail to the given parameters. It will be as tall or as wide as the size passed, whichever is smaller.
123+
- `JImage::CROP` - Gives you a thumbnail of the exact size, cropped from the center of the full sized image.

0 commit comments

Comments
 (0)