blob: ae043b53a49e8f6064924e7365154c390f510226 [file] [log] [blame]
adminb0dd10f2006-08-25 17:25:49 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html>
3<head>
4
5<title>Code Igniter User Guide</title>
6
7<style type='text/css' media='all'>@import url('../userguide.css');</style>
8<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
9
10<script type="text/javascript" src="../scripts/nav.js"></script>
11<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
12<script type="text/javascript" src="../scripts/moo.fx.js"></script>
13<script type="text/javascript">
14window.onload = function() {
15 myHeight = new fx.Height('nav', {duration: 400});
16 myHeight.hide();
17}
18</script>
19
20<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21<meta http-equiv='expires' content='-1' />
22<meta http-equiv= 'pragma' content='no-cache' />
23<meta name='robots' content='all' />
24<meta name='author' content='Rick Ellis' />
25<meta name='description' content='Code Igniter User Guide' />
26
27</head>
28<body>
29
30<!-- START NAVIGATION -->
31<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
32<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
33<div id="masthead">
34<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
35<tr>
36<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
37<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
38</tr>
39</table>
40</div>
41<!-- END NAVIGATION -->
42
43
44<!-- START BREADCRUMB -->
45<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
46<tr>
47<td id="breadcrumb">
48<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
49<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
50Image Manipulation Class
51</td>
52<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
53</tr>
54</table>
55<!-- END BREADCRUMB -->
56
57<br clear="all" />
58
59
60<!-- START CONTENT -->
61<div id="content">
62
63
64<h1>Image Manipulation Class</h1>
65
66<p>Code Igniter's Image Manipulation class lets you perform the following actions:</p>
67
68<ul>
69<li>Image Resizing</li>
70<li>Thumbnail Creation</li>
71<li>Image Cropping</li>
72<li>Image Rotating</li>
73<li>Image Watermarking</li>
74</ul>
75
76<p>All three major image libraries are supported: GD/GD2, NetPBM, and ImageMagick</p>
77
78<p class="important"><strong>Note:</strong> Watermarking is only available using the GD/GD2 library.
79In addition, even though other libraries are supported, GD is required in
80order for the script to calculate the image properties. The image processing, however, will be performed with the
81library you specify.</p>
82
83
84<h2>Initializing the Class</h2>
85
86<p>Like most other classes in Code Igniter, the image class is initialized in your controller
87using the <dfn>$this->load_library</dfn> function:</p>
88<code>$this->load->library('image_lib');</code>
89
90<p>Once the library is loaded it will be ready for use. The image library object you will use to call all functions is: <dfn>$this->image_lib</dfn></p>
91
92
93<h2>Processing an Image</h2>
94
95<p>Regardless of the type of processing you would like to perform (resizing, cropping, rotation, or watermarking), the general process is
96identical. You will set some preferences corresponding to the action you intend to perform, then
97call one of four available processing functions. For example, to create an image thumbnail you'll do this:</p>
98
99<code>$config['image_library'] = 'GD';<br />
100$config['source_image'] = '/path/to/image/mypic.jpg';<br />
101$config['create_thumb'] = TRUE;<br />
102$config['maintain_ratio'] = TRUE;<br />
103$config['width'] = 75;<br />
104$config['height'] = 50;<br />
105<br />
106$this->image_lib->initialize($config);
107<br />
108<br />
109$this->image_lib->resize();</code>
110
111<p>The above code tells the <dfn>image_resize</dfn> function to look for an image called <em>mypic.jpg</em>
112located in the <dfn>source_image</dfn> folder, then create a thumbnail that is 75 X 50 pixels using the GD2 <dfn>image_library</dfn>.
113Since the <dfn>maintain_ratio</dfn> option is enabled, the thumb will be as close to the target <dfn>width</dfn> and
114<dfn>height</dfn> as possible while preserving the original aspect ratio. The thumbnail will be called <em>mypic_thumb.jpg</em>
115</p>
116
117<p class="important"><strong>Note:</strong> In order for the image class to be allowed to do any processing, the
118folder containing the image files must have file permissions of 777.</p>
119
120
121<h2>Processing Functions</h2>
122
123<p>There are four available processing functions:</p>
124
125<ul>
126<li>$this->image_lib->resize()</li>
127<li>$this->image_lib->crop()</li>
128<li>$this->image_lib->rotate()</li>
129<li>$this->image_lib->watermark()</li>
130</ul>
131
132<p>These functions return boolean TRUE upon success and FALSE for failure. If they fail you can retrieve the
133error message using this function:</p>
134
135<code>echo $this->image_lib->display_errors();</code>
136
137<p>A good practice is use the processing function conditionally, showing an error upon failure, like this:</p>
138
139<code>if ( ! $this->image_lib->resize())<br />
140{<br />
141&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
142}</code>
143
144<p>Note: You can optionally specify the HTML formatting to be applied to the errors, by submitting the opening/closing
145tags in the function, like this:</p>
146
147<code>$this->image_lib->display_errors('<var>&lt;p></var>', '<var>&lt;/p></var>');</code>
148
149
150<h2>Preferences</h2>
151
152<p>The 14 available preferences described below allow you to tailor the image processing to suit your needs.</p>
153
154<p>Note that not all preferences are available for every
155function. For example, the x/y axis preferences are only available for image cropping. Likewise, the width and height
156preferences have no effect on cropping. The "availability" column indicates which functions support a given preference.</p>
157
158<p>Availability Legend:</p>
159
160<ul>
161<li><var>R</var> - Image Resizing</li>
162<li><var>C</var> - Image Cropping</li>
163<li><var>X</var> - Image Rotation</li>
164<li><var>W</var> - Image Watermarking</li>
165
166</ul>
167
168
169
170
171
172<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
173<tr>
174<th>Preference</th>
175<th>Default&nbsp;Value</th>
176<th>Options</th>
177<th>Description</th>
178<th>Availability</th>
179</tr>
180
181<tr>
182<td class="td"><strong>image_library</strong></td>
183<td class="td">GD2</td>
184<td class="td">GD, GD2, ImageMagick, NetPBM</td>
185<td class="td">Sets the image library to be used.</td>
186<td class="td">R, C, X, W</td>
187</tr>
188
189<tr>
190<td class="td"><strong>library_path</strong></td>
191<td class="td">None</td>
192<td class="td">None</td>
193<td class="td">Sets the server path to your ImageMagick or NetPBM library. If you use either of those libraries you must supply the path.</td>
194<td class="td">R, C, X</td>
195</tr>
196
197<tr>
198<td class="td"><strong>source_image</strong></td>
199<td class="td">None</td>
200<td class="td">None</td>
201<td class="td">Sets the source image name/path. The path must be a relative or absolute server path, not a URL.</td>
202<td class="td">R, C, S, W</td>
203</tr>
204
205<tr>
206<td class="td"><strong>dynamic_output</strong></td>
207<td class="td">FALSE</td>
208<td class="td">TRUE/FALSE (boolean)</td>
209<td class="td">Determines whether the new image file should be written to disk or generated dynamically. Note: If you choose the dynamic setting, only one image can be shown at a time, and it can't be positioned on the page. It simply outputs the raw image dynamically to your browser, along with image headers.</td>
210<td class="td">R, C, X, W</td>
211</tr>
212
213
214<tr>
215<td class="td"><strong>quality</strong></td>
216<td class="td">90%</td>
217<td class="td">1 - 100%</td>
218<td class="td">Sets the quality of the image. The higher the quality the larger the file size.</td>
219<td class="td">R, C, X, W</td>
220</tr>
221
222
223<tr>
224<td class="td"><strong>new_image</strong></td>
225<td class="td">None</td>
226<td class="td">None</td>
227<td class="td">Sets the destination image name/path. You'll use this preference when creating an image copy. The path must be a relative or absolute server path, not a URL.</td>
228<td class="td">R</td>
229</tr>
230
231<tr>
232<td class="td"><strong>width</strong></td>
233<td class="td">None</td>
234<td class="td">None</td>
235<td class="td">Sets the width you would like the image set to.</td>
236<td class="td">R</td>
237</tr>
238
239<tr>
240<td class="td"><strong>height</strong></td>
241<td class="td">None</td>
242<td class="td">None</td>
243<td class="td">Sets the height you would like the image set to.</td>
244<td class="td">R</td>
245</tr>
246
247<tr>
248<td class="td"><strong>create_thumb</strong></td>
249<td class="td">FALSE</td>
250<td class="td">TRUE/FALSE (boolean)</td>
251<td class="td">Tells the image processing function to create a thumb.</td>
252<td class="td">R</td>
253</tr>
254
255<tr>
256<td class="td"><strong>thumb_marker</strong></td>
257<td class="td">_thumb</td>
258<td class="td">None</td>
259<td class="td">Specifies the thumbnail indicator. It will be inserted just before the file extension, so mypic.jpg would become mypic_thumb.jpg</td>
260<td class="td">R</td>
261</tr>
262
263<tr>
264<td class="td"><strong>maintain_ratio</strong></td>
265<td class="td">TRUE</td>
266<td class="td">TRUE/FALSE (boolean)</td>
267<td class="td">Specifies whether to maintain the original aspect ratio when resizing or use hard values.</td>
268<td class="td">R</td>
269</tr>
270
271
272<tr>
273<td class="td"><strong>master_dim</strong></td>
274<td class="td">auto</td>
275<td class="td">auto, width, height</td>
276<td class="td">Specifies what to use as the master axis when resizing or creating thumbs. For example, let's say you want to resize an image to 100 X 75 pixels. If the source image size does not allow perfect resizing to those dimensions, this setting determines which axis should be used as the hard value. "auto" sets the axis automatically based on whether the image is taller then wider, or vice versa.</td>
277<td class="td">R</td>
278</tr>
279
280
281
282
283<tr>
284<td class="td"><strong>rotation_angle</strong></td>
285<td class="td">None</td>
286<td class="td">90, 180, 270, vrt, hor</td>
287<td class="td">Specifies the angle of rotation when rotating images. Note that PHP rotates counter-clockwise, so a 90 degree rotation to the right must be specified as 270.</td>
288<td class="td">X</td>
289</tr>
290
291
292<td class="td"><strong>x_axis</strong></td>
293<td class="td">None</td>
294<td class="td">None</td>
295<td class="td">Sets the X coordinate in pixels for image cropping. For example, a setting of 30 will crop an image 30 pixels from the left.</td>
296<td class="td">C</td>
297</tr>
298
299<td class="td"><strong>y_axis</strong></td>
300<td class="td">None</td>
301<td class="td">None</td>
302<td class="td">Sets the Y coordinate in pixels for image cropping. For example, a setting of 30 will crop an image 30 pixels from the top.</td>
303<td class="td">C</td>
304</tr>
305
306</table>
307
308
309<h2>Setting preferences in a config file</h2>
310
311<p>If you prefer not to set preferences using the above method, you can instead put them into a config file.
312Simply create a new file called the <var>image_lib.php</var>, add the <var>$config</var>
313array in that file. Then save the file in: <var>config/image_lib.php</var> and it will be used automatically. You
314will NOT need to use the <dfn>$this->image_lib->initialize</dfn> function if you save your preferences in a config file.</p>
315
316
317<h2>$this->image_lib->resize()</h2>
318
319<p>The image resizing function lets you resize the original image, create a copy (with or without resizing),
320or create a thumbnail image.</p>
321
322<p>For practical purposes there is no difference between creating a copy and creating
323a thumbnail except a thumb will have the thumbnail marker as part of the name (ie, mypic_thumb.jpg).</p>
324
325<p>All preferences listed in the table above are available for this function except these three: rotation, x_axis, and y_axis.</p>
326
327<h3>Creating a Thumbnail</h3>
328
329<p>The resizing function will create a thumbnail file (and preserve the original) if you set this preference so TRUE:</p>
330
331<code>$config['create_thumb'] = TRUE;</code>
332
333<p>This single preference determines whether a thumbnail is created or not.</p>
334
335<h3>Creating a Copy</h3>
336
337<p>The resizing function will create a copy of the image file (and preserve the original) if you set
338a path and/or a new filename using this preference:</p>
339
340<code>$config['new_image'] = '/path/to/new_image.jpg';</code>
341
342<p>Notes regarding this preference:</p>
343<ul>
344<li>If only the new image name is specified it will be placed in the same folder as the original</li>
345<li>If only the path is specified, the new image will be placed in the destination with the same name as the original.</li>
346<li>If both the path and image name are specified it will placed in its own destination and given the new name.</li>
347</ul>
348
349
350<h3>Resizing the Original Image</h3>
351
352<p>If neither of the two preferences listed above (create_thumb, and new_image) are used, the resizing function will instead
353target the original image for processing.</p>
354
355
356<h2>$this->image_lib->crop()</h2>
357
358<p>The cropping function works nearly identically to the resizing function except it requires that you set
359preferences for the X and Y axis (in pixels) specifying where to crop, like this:</p>
360
361<code>$config['x_axis'] = '100';<br />
362$config['x_axis'] = '40';</code>
363
364<p>All preferences listed in the table above are available for this function except these: rotation, width, height, create_thumb, new_image.</p>
365
366<p>Here's an example showing how you might crop an image:</p>
367
368<code>$config['image_library'] = 'imagemagick';<br />
369$config['library_path'] = '/usr/X11R6/bin/';<br />
370$config['source_image'] = '/path/to/image/mypic.jpg';<br />
371$config['x_axis'] = '100';<br />
372$config['y_axis'] = '60';<br />
373<br />
374$this->image_lib->initialize($config);
375<br />
376<br />
377if ( ! $this->image_lib->crop())<br />
378{<br />
379&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
380}</code>
381
382
383<p>Note: Without a visual interface it is difficult to crop images, so this function is not very useful
384unless you intend to build such an interface. That's exactly what we did using for the photo
385gallery module in ExpressionEngine, the CMS we develop. We added a JavaScript UI that lets the cropping
386area be selected.</p>
387
388<h2>$this->image_lib->rotate()</h2>
389
390<p>The image rotation function requires that the angle of rotation be set via its preference:</p>
391
392<code>$config['rotation_angle'] = '90';</code>
393
394<p>There are 5 rotation options:</p>
395
396<ol>
397<li>90 - rotates counter-clockwise by 90 degrees.</li>
398<li>180 - rotates counter-clockwise by 180 degrees.</li>
399<li>270 - rotates counter-clockwise by 270 degrees.</li>
400<li>hor - flips the image horizontally.</li>
401<li>vrt - flips the image vertically.</li>
402</ol>
403
404<p>Here's an example showing how you might rotate an image:</p>
405
406<code>$config['image_library'] = 'netpbm';<br />
407$config['library_path'] = '/usr/bin/';<br />
408$config['source_image'] = '/path/to/image/mypic.jpg';<br />
409$config['rotation_angle'] = 'hor';<br />
410<br />
411$this->image_lib->initialize($config);
412<br />
413<br />
414if ( ! $this->image_lib->rotate())<br />
415{<br />
416&nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />
417}</code>
418
419
420
421<p>&nbsp;</p>
422<h1>Image Watermarking</h1>
423
424<p>The Watermarking feature requires the GD/GD2 library.</p>
425
426
427<h2>Two Types of Watermarking</h2>
428
429<p>There are two types of watermarking that you can use:</p>
430
431<ul>
432<li><strong>Text</strong>: The watermark message will be generating using text, either with a True Type font that you specify, or
433using the native text output that the GD library supports. If you use the True Type version your GD installation
434must be compiled with True Type support (most are, but not all).</li>
435
436<li><strong>Overlay</strong>: The watermark message will be generated by overlaying an image (usually a transparent PNG or GIF)
437containing your watermark over the source image.</li>
438
439</ul>
440
441
442<h2>Watermarking an Image</h2>
443
444<p>Just as with the other function (resizing, cropping, and rotating) the general process for watermarking
445involves setting the preferences corresponding to the action you intend to perform, then
446calling the watermark function. Here is an example:</p>
447
448<code>
449$config['source_image'] = '/path/to/image/mypic.jpg';<br />
450$config['wm_text'] = 'Copyright 2006 - John Doe';<br />
451$config['wm_type'] = 'text';<br />
452$config['wm_font_path'] = './system/fonts/texb.ttf';<br />
453$config['wm_font_size'] = '16';<br />
454$config['wm_text_color'] = 'ffffff';<br />
455$config['wm_vrt_alignment'] = 'bottom';<br />
456$config['wm_hor_alignment'] = 'center';<br />
457$config['wm_padding'] = '20';<br />
458<br />
459$this->image_lib->initialize($config);
460<br />
461<br />
462$this->image_lib->watermark();</code>
463
464
465<p>The above example will use a 16 pixel True Type font to create the text "Copyright 2006 - John Doe". The watermark
466will be positioned at the bottom/center of the image, 20 pixels from the bottom of the image.</p>
467
468<p class="important"><strong>Note:</strong> In order for the image class to be allowed to do any processing, the image file must have file permissions of 777.</p>
469
470
471<h2>Watermarking Preferences</h2>
472
473<p>This table shown the preferences that are available for both types of watermarking (text or overlay)</p>
474
475<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
476<tr>
477<th>Preference</th>
478<th>Default&nbsp;Value</th>
479<th>Options</th>
480<th>Description</th>
481</tr>
482
483<tr>
484<td class="td"><strong>wm_type</strong></td>
485<td class="td">text</td>
486<td class="td">type, overlay</td>
487<td class="td">Sets the type of watermarking that should be used.</td>
488</tr>
489
490<tr>
491<td class="td"><strong>source_image</strong></td>
492<td class="td">None</td>
493<td class="td">None</td>
494<td class="td">Sets the source image name/path. The path must be a relative or absolute server path, not a URL.</td>
495</tr>
496
497<tr>
498<td class="td"><strong>dynamic_output</strong></td>
499<td class="td">FALSE</td>
500<td class="td">TRUE/FALSE (boolean)</td>
501<td class="td">Determines whether the new image file should be written to disk or generated dynamically. Note: If you choose the dynamic setting, only one image can be shown at a time, and it can't be positioned on the page. It simply outputs the raw image dynamically to your browser, along with image headers.</td>
502</tr>
503
504<tr>
505<td class="td"><strong>quality</strong></td>
506<td class="td">90%</td>
507<td class="td">1 - 100%</td>
508<td class="td">Sets the quality of the image. The higher the quality the larger the file size.</td>
509</tr>
510
511<tr>
512<td class="td"><strong>padding</strong></td>
513<td class="td">None</td>
514<td class="td">A number</td>
515<td class="td">The amount of padding, set in pixels, that will be applied to the watermark to set it away from the edge of your images.</td>
516</tr>
517
518<tr>
519<td class="td"><strong>wm_vrt_alignment</strong></td>
520<td class="td">bottom</td>
521<td class="td">top, middle, bottom</td>
522<td class="td">Sets the vertical alignment for the watermark image.</td>
523</tr>
524
525<tr>
526<td class="td"><strong>wm_hor_alignment</strong></td>
527<td class="td">center</td>
528<td class="td">left, center, right</td>
529<td class="td">Sets the horizontal alignment for the watermark image.</td>
530</tr>
531
532<tr>
533<td class="td"><strong>wm_vrt_offset</strong></td>
534<td class="td">None</td>
535<td class="td">None</td>
536<td class="td">You may specify a horizontal offset (in pixels) to apply to the watermark position. The offset normally moves the watermark to the right, except if you have your alignment set to "right" then your offset value will move the watermark toward the left of the image.</td>
537</tr>
538
539<tr>
540<td class="td"><strong>wm_hor_offset</strong></td>
541<td class="td">None</td>
542<td class="td">None</td>
543<td class="td">You may specify a horizontal offset (in pixels) to apply to the watermark position. The offset normally moves the watermark down, except if you have your alignment set to "bottom" then your offset value will move the watermark toward the top of the image.</td>
544</tr>
545
546</table>
547
548
549
550<h3>Text Preferences</h3>
551<p>This table shown the preferences that are available for the text type of watermarking.</p>
552
553
554<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
555<tr>
556<th>Preference</th>
557<th>Default&nbsp;Value</th>
558<th>Options</th>
559<th>Description</th>
560</tr>
561
562<tr>
563<td class="td"><strong>wm_text</strong></td>
564<td class="td">None</td>
565<td class="td">None</td>
566<td class="td">The text you would like shown as the watermark. Typically this will be a copyright notice.</td>
567</tr>
568
569<tr>
570<td class="td"><strong>wm_font_path</strong></td>
571<td class="td">None</td>
572<td class="td">None</td>
573<td class="td">The server path to the True Type Font you would like to use Code Igniter includes a font in the system/fonts folder. If you do not use this option, the native GD font will be used.</td>
574</tr>
575
576<tr>
577<td class="td"><strong>wm_font_size</strong></td>
578<td class="td">16</td>
579<td class="td">None</td>
580<td class="td">The size of the text. Note: If you are not using the True Type option above, the number is set using a range of 1 - 5. Otherwise, you can use any valid pixel size for the font you're using.</td>
581</tr>
582
583<tr>
584<td class="td"><strong>wm_font_color</strong></td>
585<td class="td">ffffff</td>
586<td class="td">None</td>
587<td class="td">The font color, specified in hex. Note, you must use the full 6 character hex value (ie, 993300), rather than the three character abbreviated version (ie fff).</td>
588</tr>
589
590
591<tr>
592<td class="td"><strong>wm_shadow_color</strong></td>
593<td class="td">None</td>
594<td class="td">None</td>
595<td class="td">The color of the drop shadow, specified in hex. If you leave this blank a drop shadow will not be used. Note, you must use the full 6 character hex value (ie, 993300), rather than the three character abbreviated version (ie fff).</td>
596</tr>
597
598<tr>
599<td class="td"><strong>wm_shadow_distance</strong></td>
600<td class="td">3</td>
601<td class="td">None</td>
602<td class="td">The distance (in pixels) from the font that the drop shadow should appear.</td>
603</tr>
604
605</table>
606
607
608
609
610<h3>Overlay Preferences</h3>
611<p>This table shown the preferences that are available for the overlay type of watermarking.</p>
612
613
614<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
615<tr>
616<th>Preference</th>
617<th>Default&nbsp;Value</th>
618<th>Options</th>
619<th>Description</th>
620</tr>
621
622<tr>
623<td class="td"><strong>wm_overlay_path</strong></td>
624<td class="td">None</td>
625<td class="td">None</td>
626<td class="td">The server path to the image you wish to use as your watermark. Required only if you are using the overlay method.</td>
627</tr>
628
629<tr>
630<td class="td"><strong>wm_opacity</strong></td>
631<td class="td">50</td>
632<td class="td">1 - 100</td>
633<td class="td">Image opacity. You may specify the opacity (i.e. transparency) of your watermark image. This allows the watermark to be faint and not completely obscure the details from the original image behind it. A 50% opacity is typical.</td>
634</tr>
635
636<tr>
637<td class="td"><strong>wm_x_transp</strong></td>
638<td class="td">4</td>
639<td class="td">A number</td>
640<td class="td">If your watermark image is a PNG or GIF image, you may specify a color on the image to be "transparent". This setting (along with the next) will allow you to specify that color. This works by specifying the "X" and "Y" coordinate pixel (measured from the upper left) within the image that corresponds to a pixel representative of the color you want to be transparent.</td>
641</tr>
642
643<tr>
644<td class="td"><strong>wm_y_transp</strong></td>
645<td class="td">4</td>
646<td class="td">A number</td>
647<td class="td">Along with the previous setting, this allows you to specify the coordinate to a pixel representative of the color you want to be transparent.</td>
648</tr>
649</table>
650
651
652
653</div>
654<!-- END CONTENT -->
655
656
657<div id="footer">
658<p>
659Previous Topic:&nbsp;&nbsp;<a href="file_uploading.html">File Uploading Class</a>
660&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
661<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
662<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
663Next Topic:&nbsp;&nbsp;<a href="input.html">Input Class</a>
664<p>
665<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
666</div>
667
668</body>
669</html>