File: Montage_mpp.tex

package info (click to toggle)
imagemagick 6:6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (284 lines) | stat: -rw-r--r-- 13,996 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
\section{}
\scriptsize{
\begin{verbatim}

Magick::Montage Class

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.

The following illustration shows a montage consisting of three columns and
two rows of thumbnails rendered on a gray background:

[montage-sample-framed.jpg]

Montages may be either "plain" (undecorated thumbnails) or "framed"
(decorated thumbnails). In order to more easily understand the options
supplied to MontageImages(), montage options are supplied by two different
classes: Magick::Montage and Magick::MontageFramed.


Plain Montages

Magick::Montage is the base class to provide montage options and provides
methods to set all options required to render simple (un-framed) montages.
See Magick::MontageFramedif you would like to create a framed montage.

Un-framed thumbnails consist of four components: the thumbnail image, the
thumbnail border, an optional thumbnail shadow, and an optional thumbnail
label area.



[thumbnail-anatomy-plain.jpg]

                               Montage Methods

 Method           Return Type       Signature(s)        Description

 Montage                            void                Default constructor

                                                        Specifies the
 backgroundColor  void              const Color         background color
                                    &backgroundColor_   that thumbnails are
                                                        imaged upon.

                  Color             void

                                                        Specifies the image
                                                        composition
                                                        algorithm for
                                                        thumbnails. This
                                                        controls the
                                                        algorithm by which
                                                        the thumbnail image
                                                        is placed on the
 compose          void              CompositeOperator   background. Use of
                                    compose_            OverCompositeOp is
                                                        recommended for use
                                                        with images that
                                                        have transparency.
                                                        This option may
                                                        have negative
                                                        side-effects for
                                                        images without
                                                        transparency.

                  CompositeOperator void

                                                        Specifies the image
                                                        filename to be used
                                                        for the generated
                                                        montage images. To
                                                        handle the case
                                                        were multiple
                                                        montage images are
                                                        generated, a
                                                        printf-style format
 fileName         void              std::string         may be embedded
                                    fileName_
                                                        within the
                                                        filename. For
                                                        example, a filename
                                                        specification of
                                                        image%02d.miff
                                                        names the montage
                                                        images as
                                                        image00.miff,
                                                        image01.miff, etc.

                  std::string       void

                                                        Specifies the fill
 fill             void              const Color &pen_   color to use for
                                                        the label text.

                  Color             void

                                                        Specifies the
 font             void              std::string font_   thumbnail label
                                                        font.

                  std::string       void

                                                        Specifies the size
 geometry         void              const Geometry      of the generated
                                    &geometry_
                                                        thumbnail.

                  Geometry          void

                                                        Specifies the
                                                        thumbnail
                                                        positioning within
                                                        the specified
                                                        geometry area. If
 gravity          void              GravityType gravity_the thumbnail is
                                                        smaller in any
                                                        dimension than the
                                                        geometry, then it
                                                        is placed according
                                                        to this
                                                        specification.

                  GravityType       void

                                                        Specifies the
                                                        format used for the
                                                        image label.
                                                        Special format
 label            void              std::string label_  characters may be
                                                        embedded in the
                                                        format string to
                                                        include information
                                                        about the image.

                  std::string       void

                                                        Specifies the pen
 penColor         void              const Color &pen_   color to use for
                                                        the label text
                                                        (same as fill).

                  Color             void

                                                        Specifies the
 pointSize        void              unsigned int        thumbnail label
                                    pointSize_
                                                        font size.

                  unsigned int      void

                                                        Enable/disable
 shadow           void              bool shadow_        drop-shadow on
                                                        thumbnails.

                  bool              void

                                                        Specifies the
 stroke           void              const Color &pen_   stroke color to use
                                                        for the label text
                                                        .

                  Color             void

                                                        Specifies a texture
                                                        image to use as
                                                        montage background.
                                                        The built-in
 texture          void              std::string texture_textures "granite:"
                                                        and "plasma:" are
                                                        available. A
                                                        texture is the same
                                                        as a background
                                                        image.

                  std::string       void

                                                        Specifies the
                                                        maximum number of
                                                        montage columns and
                                                        rows in the
                                                        montage. The
                                                        montage is built by
                                                        filling out all
 tile             void              const Geometry      cells in a row
                                    &tile_              before advancing to
                                                        the next row. Once
                                                        the montage has
                                                        reached the maximum
                                                        number of  columns
                                                        and rows, a new
                                                        montage image is
                                                        started.

                  Geometry          void

                                                        Specifies a montage
                                                        color to set
                                                        transparent.  This
                                                        option can be set
                                                        the same as the
                                                        background color in
                                                        order for the
                                                        thumbnails to
 transparentColor void              const Color         appear without a
                                    &transparentColor_  background when
                                                        rendered on an HTML
                                                        page. For best
                                                        effect, ensure that
                                                        the transparent
                                                        color selected does
                                                        not occur in the
                                                        rendered thumbnail
                                                        colors.

                  Color             void


Framed Montages

Magick::MontageFramed provides the means to specify montage options when it
is desired to have decorative frames around the image thumbnails.
MontageFramed inherits from Montage and therefore provides all the methods
of Montage as well as those shown in the table "MontageFramed Methods".

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.



[thumbnail-anatomy-framed.jpg]

                            MontageFramed Methods

 Method        Return     Signature(s)        Description
               Type


 MontageFramed            void                Default constructor (enable
                                              frame via frameGeometry).

                                              Specifies the background
 borderColor   void       const Color         color within the thumbnail
                          &borderColor_
                                              frame.

               Color      void

                                              Specifies the border (in
                                              pixels) to place between a
                                              thumbnail and its surrounding
                                              frame. This option only takes
                                              effect if thumbnail frames
 borderWidth   void       unsigned int        are enabled (via
                          borderWidth_
                                              frameGeometry) and the
                                              thumbnail geometry
                                              specification doesn't also
                                              specify the thumbnail border
                                              width.


               unsigned   void
               int

                                              Specifies the geometry
                                              specification for frame to
 frameGeometry void       const Geometry      place around thumbnail. If
                          &frame_             this parameter is not
                                              specified, then the montage
                                              is un-framed.

               Geometry   void


 matteColor    void       const Color         Specifies the thumbnail frame
                          &matteColor_        color.

               Color      void

\end{verbatim}
}