1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<title>Magick++ API: Montage</title>
7<link rel="stylesheet" href="magick.css" type="text/css" />
8</head>
9<body>
10<div class="doc-section">
11<h1 align="center">Magick::Montage Class</h1>
12<p>A montage is a single image which is composed of thumbnail images composed in a uniform grid. The size of the montage image is determined by the size of the individual thumbnails and the number of rows and columns in the grid.</p>
13<p>The following illustration shows a montage consisting of three columns and two rows of thumbnails rendered on a gray background:</p>
14<p class="image"><img src="montage-sample-framed.jpg" name="Graphic1" align="bottom" width="378" height="238" border="0"/></p>
15<p>Montages may be either "plain" (undecorated thumbnails) or "framed" (decorated thumbnails). In order to more easily understand the options supplied to <a href="STL.html#montageImages"><i>MontageImages()</i></a>, montage options are supplied by two different classes: <a href="Montage.html#Magick::Montage"><i>Magick::Montage</i></a> and <a href="Montage.html#Magick::MontageFramed"><i>Magick::MontageFramed</i></a>.</p>
16<h3 align="center"><a name="PlainMontages"></a>Plain Montages</h3>
17<p><a name="Magick::Montage"></a><i>Magick::Montage</i> is the base class to provide montage options and provides methods to set all options required to render simple (unframed) montages. See <a href="Montage.html#Magick::MontageFramed"><i>Magick::MontageFramed</i></a>if you would like to create a framed montage.</p>
18<p>Unframed thumbnails consist of four components: the thumbnail image, the thumbnail border, an optional thumbnail shadow, and an optional thumbnail label area.</p>
19<p class="image"><img src="thumbnail-anatomy-plain.jpg" name="Graphic2" align="middle" width="309" height="327" border="0"/></p>
20<p style="margin-bottom: 0cm"> </p>
21<p align="center" style="margin-bottom: 0cm"><b>Montage Methods</b></p>
22<ul><table width="100%" border="1" cellpadding="2" cellspacing="2">
23<tr>
24<td>
25<p align="center"><b>Method</b></p></td>
26<td>
27<p align="center"><b>Return Type</b></p></td>
28<td>
29<p align="center"><b>Signature(s)</b></p></td>
30<td>
31<p align="center"><b>Description</b></p></td></tr>
32<tr>
33<td>
34<p align="center"><font size="2">Montage</font></p></td>
35<td bgcolor="#666666"></td>
36<td>
37<p><font size="2">void</font></p></td>
38<td>
39<p><font size="2">Default constructor</font></p></td></tr>
40<tr>
41<td rowspan="2">
42<p align="center"><a name="backgroundColor"></a><font size="2">backgroundColor</font></p></td>
43<td>
44<p><font size="2">void</font></p></td>
45<td>
46<p><font size="2">const <a href="Color.html">Color</a> &amp;backgroundColor_</font></p></td>
47<td rowspan="2">
48<p><font size="2">Specifies the background color that thumbnails are imaged upon.</font></p></td></tr>
49<tr>
50<td>
51<p><a href="Color.html"><font size="2">Color</font></a></p></td>
52<td>
53<p><font size="2">void</font></p></td></tr>
54<tr>
55<td rowspan="2">
56<p align="center"><a name="compose"></a><font size="2">compose</font></p></td>
57<td>
58<p><font size="2">void</font></p></td>
59<td>
60<p><font size="2"><a href="Enumerations.html#CompositeOperator">CompositeOperator</a> compose_</font></p></td>
61<td rowspan="2">
62<p><font size="2">Specifies the image composition algorithm for thumbnails. This controls the algorithm by which the thumbnail image is placed on the background. Use of OverCompositeOp is recommended for use with images that have transparency. This option may have negative side-effects for images without transparency.</font></p></td></tr>
63<tr>
64<td>
65<p><a href="Enumerations.html#CompositeOperator"><font size="2">CompositeOperator</font></a></p></td>
66<td>
67<p><font size="2">void</font></p></td></tr>
68<tr>
69<td rowspan="2">
70<p align="center"><a name="fileName"></a><font size="2">fileName</font></p></td>
71<td>
72<p><font size="2">void</font></p></td>
73<td>
74<p><font size="2">std::string fileName_</font></p></td>
75<td rowspan="2">
76<p><font size="2">Specifies the image filename to be used for the generated montage images. To handle the case were multiple montage images are generated, a <span lang="en-US">printf</span>-style format may be embedded within the filename. For example, a filename specification of image%02d.miff names the montage images as image00.miff, image01.miff, etc.</font></p></td></tr>
77<tr>
78<td>
79<p><font size="2">std::string</font></p></td>
80<td>
81<p><font size="2">void</font></p></td></tr>
82<tr>
83<td rowspan="2">
84<p align="center"><a name="fill"></a>fill</p></td>
85<td>
86<p><font size="2">void</font></p></td>
87<td>
88<p><font size="2">const <a href="Color.html">Color</a> &amp;pen_</font></p></td>
89<td rowspan="2">
90<p><font size="2">Specifies the fill color to use for the label text.</font></p></td></tr>
91<tr>
92<td>
93<p><a href="Color.html"><font size="2">Color</font></a></p></td>
94<td>
95<p><font size="2">void</font></p></td></tr>
96<tr>
97<td rowspan="2">
98<p align="center"><a name="font"></a><font size="2">font</font></p></td>
99<td>
100<p><font size="2">void</font></p></td>
101<td>
102<p><font size="2">std::string font_</font></p></td>
103<td rowspan="2">
104<p><font size="2">Specifies the thumbnail label font.</font></p></td></tr>
105<tr>
106<td>
107<p><font size="2">std::string</font></p></td>
108<td>
109<p><font size="2">void</font></p></td></tr>
110<tr>
111<td rowspan="2">
112<p align="center"><a name="geometry"></a><font size="2">geometry</font></p></td>
113<td>
114<p><font size="2">void</font></p></td>
115<td>
116<p><font size="2">const <a href="Geometry.html">Geometry</a> &amp;geometry_</font></p></td>
117<td rowspan="2">
118<p><font size="2">Specifies the size of the generated thumbnail.</font></p></td></tr>
119<tr>
120<td>
121<p><a href="Geometry.html"><font size="2">Geometry</font></a></p></td>
122<td>
123<p><font size="2">void</font></p></td></tr>
124<tr>
125<td rowspan="2">
126<p align="center"><a name="gravity"></a><font size="2">gravity</font></p></td>
127<td>
128<p><font size="2">void</font></p></td>
129<td>
130<p><font size="2"><a href="Enumerations.html#GravityType">GravityType</a> gravity_</font></p></td>
131<td rowspan="2">
132<p><font size="2">Specifies the thumbnail positioning within the specified geometry area. If the thumbnail is smaller in any dimension than the geometry, then it is placed according to this specification.</font></p></td></tr>
133<tr>
134<td>
135<p><a href="Enumerations.html"><font size="2">GravityType</font></a></p></td>
136<td>
137<p><font size="2">void</font></p></td></tr>
138<tr>
139<td rowspan="2">
140<p align="center"><a name="label"></a><font size="2">label</font></p></td>
141<td>
142<p><font size="2">void</font></p></td>
143<td>
144<p><font size="2">std::string label_</font></p></td>
145<td rowspan="2">
146<p><font size="2">Specifies the format used for the image label. Special <a href="FormatCharacters.html">format characters</a> may be embedded in the format string to include information about the image.</font></p></td></tr>
147<tr>
148<td>
149<p><font size="2">std::string</font></p></td>
150<td>
151<p><font size="2">void</font></p></td></tr>
152<tr>
153<td rowspan="2">
154<p align="center"><a name="penColor"></a><font size="2">penColor</font></p></td>
155<td>
156<p><font size="2">void</font></p></td>
157<td>
158<p><font size="2">const <a href="Color.html">Color</a> &amp;pen_</font></p></td>
159<td rowspan="2">
160<p><font size="2">Specifies the pen color to use for the label text (same as <i>fill</i>).</font></p></td></tr>
161<tr>
162<td>
163<p><a href="Color.html"><font size="2">Color</font></a></p></td>
164<td>
165<p><font size="2">void</font></p></td></tr>
166<tr>
167<td rowspan="2">
168<p align="center"><a name="pointSize"></a><font size="2">pointSize</font></p></td>
169<td>
170<p><font size="2">void</font></p></td>
171<td>
172<p><font size="2">size_t pointSize_</font></p></td>
173<td rowspan="2">
174<p><font size="2">Specifies the thumbnail label font size.</font></p></td></tr>
175<tr>
176<td>
177<p><font size="2">size_t</font></p></td>
178<td>
179<p><font size="2">void</font></p></td></tr>
180<tr>
181<td rowspan="2">
182<p align="center"><a name="shadow"></a><font size="2">shadow</font></p></td>
183<td>
184<p><font size="2">void</font></p></td>
185<td>
186<p><font size="2">bool shadow_</font></p></td>
187<td rowspan="2">
188<p><font size="2">Enable/disable drop-shadow on thumbnails.</font></p></td></tr>
189<tr>
190<td>
191<p><font size="2">bool</font></p></td>
192<td>
193<p><font size="2">void</font></p></td></tr>
194<tr>
195<td rowspan="2">
196<p align="center"><a name="stroke"></a><font size="2">stroke</font></p></td>
197<td>
198<p>void</p></td>
199<td>
200<p><font size="2">const <a href="Color.html">Color</a> &amp;pen_</font></p></td>
201<td rowspan="2">
202<p><font size="2">Specifies the stroke color to use for the label text .</font></p></td></tr>
203<tr>
204<td>
205<p><a href="Color.html"><font size="2">Color</font></a></p></td>
206<td>
207<p><font size="2">void</font></p></td></tr>
208<tr>
209<td rowspan="2">
210<p align="center"><a name="texture"></a><font size="2">texture</font></p></td>
211<td>
212<p><font size="2">void</font></p></td>
213<td>
214<p><font size="2">std::string texture_</font></p></td>
215<td rowspan="2">
216<p><font size="2">Specifies a texture image to use as montage background. The built-in textures "<tt>granite:</tt>" and "<tt>plasma:</tt>" are available. A texture is the same as a background image.</font></p></td></tr>
217<tr>
218<td>
219<p><font size="2">std::string</font></p></td>
220<td>
221<p><font size="2">void</font></p></td></tr>
222<tr>
223<td rowspan="2">
224<p align="center"><a name="tile"></a><font size="2">tile</font></p></td>
225<td>
226<p><font size="2">void</font></p></td>
227<td>
228<p><font size="2">const <a href="Geometry.html">Geometry</a> &amp;tile_</font></p></td>
229<td rowspan="2">
230<p><font size="2">Specifies the maximum number of montage columns and rows in the montage. The montage is built by filling out all cells in a row before advancing to the next row. Once the montage has reached the maximum number of columns and rows, a new montage image is started.</font></p></td></tr>
231<tr>
232<td>
233<p><a href="Geometry.html"><font size="2">Geometry</font></a></p></td>
234<td>
235<p><font size="2">void</font></p></td></tr>
236<tr>
237<td rowspan="2">
238<p align="center"><a name="transparentColor"></a><font size="2">transparentColor</font></p></td>
239<td>
240<p><font size="2">void</font></p></td>
241<td>
242<p><font size="2">const <a href="Color.html">Color</a> &amp;transparentColor_</font></p></td>
243<td rowspan="2">
244<p><font size="2">Specifies a montage color to set transparent. This option can be set the same as the background color in order for the thumbnails to appear without a background when rendered on an HTML page. For best effect, ensure that the transparent color selected does not occur in the rendered thumbnail colors.</font></p></td></tr>
245<tr>
246<td>
247<p><a href="Color.html"><font size="2">Color</font></a></p></td>
248<td>
249<p><font size="2">void</font></p></td></tr></table></ul>
250<h3 align="center"><a name="FramedMontages"></a>Framed Montages</h3>
251<p><a name="Magick::MontageFramed"></a><i>Magick::MontageFramed</i> provides the means to specify montage options when it is desired to have decorative frames around the image thumbnails. <i>MontageFramed</i> inherits from <i>Montage</i> and therefore provides all the methods of <i>Montage</i> as well as those shown in the table "MontageFramed Methods".</p>
252<p>Framed thumbnails consist of four components: the thumbnail image, the thumbnail frame, the thumbnail border, an optional thumbnail shadow, and an optional thumbnail label area.</p>
253<p class="image"><img src="thumbnail-anatomy-framed.jpg" name="Graphic3" align="middle" width="350" height="345" border="0" /></p>
254<p style="margin-bottom: 0cm"> </p>
255<p align="center" style="margin-bottom: 0cm"><b>MontageFramed Methods</b></p>
256<ul><table width="100%" border="1" cellpadding="2" cellspacing="2">
257<tr>
258<td>
259<p align="center"><b>Method</b></p></td>
260<td>
261<p align="center"><b>Return Type</b></p></td>
262<td>
263<p align="center"><b>Signature(s)</b></p></td>
264<td>
265<p align="center"><b>Description</b></p></td></tr>
266<tr>
267<td>
268<p align="center"><font size="2">MontageFramed</font></p></td>
269<td bgcolor="#666666"></td>
270<td>
271<p><font size="2">void</font></p></td>
272<td>
273<p><font size="2">Default constructor (enable frame via <i>frameGeometry</i>).</font></p></td></tr>
274<tr>
275<td rowspan="2">
276<p align="center"><a name="borderColor"></a><font size="2">borderColor</font></p></td>
277<td>
278<p><font size="2">void</font></p></td>
279<td>
280<p><font size="2">const <a href="Color.html">Color</a> &amp;borderColor_</font></p></td>
281<td rowspan="2">
282<p><font size="2">Specifies the background color within the thumbnail frame.</font></p></td></tr>
283<tr>
284<td>
285<p><a href="Color.html"><font size="2">Color</font></a></p></td>
286<td>
287<p><font size="2">void</font></p></td></tr>
288<tr>
289<td rowspan="2">
290<p align="center"><a name="borderWidth"></a><font size="2">borderWidth</font></p></td>
291<td>
292<p><font size="2">void</font></p></td>
293<td>
294<p><font size="2">size_t borderWidth_</font></p></td>
295<td rowspan="2">
296<p><font size="2">Specifies the border (in pixels) to place between a thumbnail and its surrounding frame. This option only takes effect if thumbnail frames are enabled (via <i>frameGeometry</i>) and the thumbnail geometry specification doesn't also specify the thumbnail border width.</font></p></td></tr>
297<tr>
298<td>
299<p><font size="2">size_t</font></p></td>
300<td>
301<p><font size="2">void</font></p></td></tr>
302<tr>
303<td rowspan="2">
304<p align="center"><a name="frameGeometry"></a><font size="2">frameGeometry</font></p></td>
305<td>
306<p><font size="2">void</font></p></td>
307<td>
308<p><font size="2">const <a href="Geometry.html">Geometry</a> &amp;frame_</font></p></td>
309<td rowspan="2">
310<p><font size="2">Specifies the geometry specification for frame to place around thumbnail. If this parameter is not specified, then the montage is unframed.</font></p></td></tr>
311<tr>
312<td>
313<p><a href="Geometry.html"><font size="2">Geometry</font></a></p></td>
314<td>
315<p><font size="2">void</font></p></td></tr>
316<tr>
317<td rowspan="2">
318<p align="center"><a name="matteColor"></a><font size="2">matteColor</font></p></td>
319<td>
320<p><font size="2">void</font></p></td>
321<td>
322<p><font size="2">const <a href="Color.html">Color</a> &amp;matteColor_</font></p></td>
323<td rowspan="2">
324<p><font size="2">Specifies the thumbnail frame color.</font></p></td></tr>
325<tr>
326<td>
327<p><a href="Color.html"><font size="2">Color</font></a></p></td>
328<td>
329<p><font size="2">void</font></p></td></tr></table></ul>
330</div>
331</body>
332</html>
333