Penguin
Annotated edit history of pnmcomp(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmcomp
2 !!!pnmcomp
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 SEE ALSO
8 AUTHOR
9 ----
10 !!NAME
11
12
13 pnmcomp - composite (overlay) two portable anymap files together
14 !!SYNOPSIS
15
16
17 __pnmcomp__ [[__-xoff=__''X'' |
18 __-align=__{__left__,__center__,__right__}]
19 [[__-yoff=__''Y'' |
20 __-valign=__{__top__,__middle__,__bottom__}]
21 [[__-alpha=__''alpha-pgmfile''] [[__-invert__]''
22 overlay'' [[''pnm-input'']
23 [[''pnm-output'']
24
25
26 Minimum unique abbreviations are acceptable.
27 !!DESCRIPTION
28
29
30 __pnmcomp__ reads two images and produces a composite
31 image with one of the images overlayed on top of the other.
32 The images need not be the same size. The input and outputs
33 are PNM format image files.
34
35
36 In its simplest use, __pnmcomp__ simply places the
37 ''overlay'' file on top of the ''pnm-input'' file,
38 blocking out the part of the ''pnm-input'' file beneath
39 it. If you specify the ''alpha-pgmfile'', __pnmcomp__
40 uses it as an alpha mask, which means it determines the
41 level of transparency of each point in the overlay image.
42 The alpha mask must have the same dimensions as the overlay
43 image. In places where the alpha mask defines the overlay
44 image to be opaque, the composite output contains only the
45 contents of the overlay image; the underlying image is
46 totally blocked out. In places where the alpha mask defines
47 the overlay image to be transparent, the composite output
48 contains none of the overlay image; the underlying image
49 shows through completely. In places where the alpha mask
50 shows a value in between opaque and transparent
51 (translucence), the composite image contains a mixture of
52 the overlay image and the underlying image and the level of
53 translucence determines how much of each.
54
55
56 The alpha mask is a PGM file in which a white pixel
57 represents opaqueness and a black pixel transparency.
58 Anything in between is translucent.
59
60
61 In some image file formats (PNG, for example), transparency
62 information (the alpha mask) is part of the definition of
63 the image. In the PNM formats, transparency is always
64 embodied in a separate companion file. The PNM converter
65 programs that convert from an image format such as PNG have
66 options that allow you to extract the transparency
67 information to a separate file, which you can then use as
68 input to __pnmcomp__.
69
70
71 The output image is always of the same dimensions as the
72 underlying image. __pnmcomp__ only uses parts of the
73 overlay image that fit within the underlying
74 image.
75
76
77 To specify where on the underlying image to place the
78 overlay image, use the __-xoff__, __-yoff__,
79 __-align__, and __-valign__ options. Without these
80 options, the default horizontal position is flush left and
81 the default vertical position is flush top.
82
83
84 The overlay and underlying images may be of different
85 formats (e.g. overlaying a PBM text image over a full color
86 PPM image) and have different maxvals. The output image has
87 the more general of the two input formats and a maxval that
88 is the least common multiple the two maxvals (or the maximum
89 maxval allowable by the format, if the LCM is more than
90 that).
91 !!OPTIONS
92
93
94 __-invert__
95
96
97 This option inverts the sense of the values in the alpha
98 mask, which effectively switches the roles of the overlay
99 image and the underlying image in places where the two
100 intersect.
101
102
103 __-xoff__ ''X''
104
105
106 __-yoff__ ''Y''
107
108
109 These options position the overlay image with respect to the
110 underlying image. ''X'' and ''Y'' are the horizontal
111 and vertical displacements of the top left corner of the
112 overlay image from the top left corner of the underlying
113 image, in pixels. A positive value means right or down; a
114 negative value means left or up. The overlay need not fit
115 entirely (or at all) on the underlying image. __pnmcomp__
116 uses only the parts that lie over the underlying
117 image.
118
119
120 __-align=__[[__left__,__center__,__right__]
121
122
123 This option is an alternative to __-xoff__, in the style
124 of HTML. It selects the horizontal position of the overlay
125 image so that it is flush left, centered, or flush right on
126 the underlying image.
127
128
129 __-valign=__[[__top__,__middle__,__bottom__]
130
131
132 This option is an alternative to __-yoff__, in the style
133 of HTML. It selects the vertical position of the overlay
134 image so that it is flush top, centered, or flush bottom on
135 the underlying image.
136 !!SEE ALSO
137
138
139 ppmmix(1) and pnmpaste(1) are simpler, less
140 general versions of the same tool.
141
142
143 pnm(5), pbmmask(1)
144 !!AUTHOR
145
146
147 Copyright (C) 1992 by David Koblas
148 (koblas@mips.com).
149 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.