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
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,8 +98,9 @@ You will need to include the image resource or you will end up with an exact cop
98
98
99
99
.. literalinclude:: images/006.php
100
100
101
+
******************
101
102
Processing Methods
102
-
==================
103
+
******************
103
104
104
105
There are seven available processing methods:
105
106
@@ -120,7 +121,7 @@ error upon failure, like this:
120
121
.. literalinclude:: images/007.php
121
122
122
123
Cropping Images
123
-
---------------
124
+
===============
124
125
125
126
Images can be cropped so that only a portion of the original image remains. This is often used when creating
126
127
thumbnail images that should match a certain size/aspect ratio. This is handled with the ``crop()`` method::
@@ -140,7 +141,7 @@ offset values:
140
141
.. literalinclude:: images/008.php
141
142
142
143
Converting Images
143
-
-----------------
144
+
=================
144
145
145
146
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::
146
147
@@ -154,7 +155,7 @@ The ``convert()`` method changes the library's internal indicator for the desire
154
155
indicated by their extension, ignoring ``$imageType``.
155
156
156
157
Fitting Images
157
-
--------------
158
+
==============
158
159
159
160
The ``fit()`` method aims to help simplify cropping a portion of an image in a "smart" way, by doing the following steps:
160
161
@@ -175,7 +176,7 @@ This provides a much simpler way to crop that will always maintain the aspect ra
175
176
.. literalinclude:: images/010.php
176
177
177
178
Flattening Images
178
-
-----------------
179
+
=================
179
180
180
181
The ``flatten()`` method aims to add a background color behind transparent images (PNG) and convert RGBA pixels to RGB pixels
181
182
@@ -192,7 +193,7 @@ The ``flatten()`` method aims to add a background color behind transparent image
192
193
.. literalinclude:: images/011.php
193
194
194
195
Flipping Images
195
-
---------------
196
+
===============
196
197
197
198
Images can be flipped along either their horizontal or vertical axis::
198
199
@@ -203,7 +204,7 @@ Images can be flipped along either their horizontal or vertical axis::
203
204
.. literalinclude:: images/012.php
204
205
205
206
Resizing Images
206
-
---------------
207
+
===============
207
208
208
209
Images can be resized to fit any dimension you require with the ``resize()`` method::
209
210
@@ -221,7 +222,7 @@ while the other dimension will be altered to match the original image's aspect r
221
222
.. literalinclude:: images/013.php
222
223
223
224
Rotating Images
224
-
---------------
225
+
===============
225
226
226
227
The ``rotate()`` method allows you to rotate an image in 90 degree increments::
227
228
@@ -233,7 +234,7 @@ The ``rotate()`` method allows you to rotate an image in 90 degree increments::
233
234
If the value is any other than the three values listed above, it will throw a CodeIgniter\Images\ImageException.
234
235
235
236
Adding a Text Watermark
236
-
-----------------------
237
+
=======================
237
238
238
239
You can overlay a text watermark onto the image very simply with the ``text()`` method. This is useful for placing copyright
239
240
notices, photographer names, or simply marking the images as a preview so they won't be used in other people's final
0 commit comments