You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/libraries/images.rst
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,18 +159,19 @@ offset values::
159
159
Converting Images
160
160
-----------------
161
161
162
-
The ``convert()`` method changes the library's internal indicator for the desired file format. This doesn't touch the actual image resource, but indicates to ``save()`` what format to use.
162
+
The ``convert()`` method changes the library's internal indicator for the desired file format. This doesn't touch the actual image resource, but indicates to ``save()`` what format to use::
163
163
164
164
convert(int $imageType)
165
165
166
-
- **$imageType** is one of PHP's image type constants (see for example https://www.php.net/manual/en/function.image-type-to-mime-type.php)
166
+
- **$imageType** is one of PHP's image type constants (see for example https://www.php.net/manual/en/function.image-type-to-mime-type.php)::
167
167
168
168
Services::image()
169
169
->withFile('/path/to/image/mypic.jpg')
170
170
->convert(IMAGETYPE_PNG)
171
171
->save('path/to/new/image.png');
172
172
173
-
.. note:: ImageMagick already saves files in the type indicated by their extension, ignoring **$imageType**
173
+
.. note:: ImageMagick already saves files in the type
174
+
indicated by their extension, ignoring **$imageType**
0 commit comments