[trunk] updated copyright and added copyright notice required by ISO, in each file...
[openjpeg.git] / doc / man / man1 / opj_compress.1
1 '\" t
2 '\" The line above instructs most `man' programs to invoke tbl
3 '\"
4 '\" Separate paragraphs; not the same as PP which resets indent level.
5 .de SP
6 .if t .sp .5
7 .if n .sp
8 ..
9 '\"
10 '\" Replacement em-dash for nroff (default is too short).
11 .ie n .ds m " -
12 .el .ds m \(em
13 '\"
14 '\" Placeholder macro for if longer nroff arrow is needed.
15 .ds RA \(->
16 '\"
17 '\" Decimal point set slightly raised
18 .if t .ds d \v'-.15m'.\v'+.15m'
19 .if n .ds d .
20 '\"
21 '\" Enclosure macro for examples
22 .de EX
23 .SP
24 .nf
25 .ft CW
26 ..
27 .de EE
28 .ft R
29 .SP
30 .fi
31 ..
32 .TH opj_compress 1 "Version 1.4.0" "opj_compress" "converts to jpeg2000 files"
33 .P
34 .SH NAME
35 opj_compress - 
36 This program reads in an image of a certain type and converts it to a
37 jpeg2000 file. It is part of the OpenJPEG library.
38 .SP
39 Valid input image extensions are
40 .B .bmp, .pgm, .pgx, .png, .pnm, .ppm, .raw, .tga, .tif \fR. For PNG resp. TIF it needs libpng resp. libtiff .
41 .SP
42 Valid output image extensions are
43 .B .j2k, .jp2
44 .SH SYNOPSIS
45 .P
46 .B opj_compress -i \fRinfile.bmp \fB-o \fRoutfile.j2k
47 .P
48 .B opj_compress -ImgDir \fRdirectory_name \fB-OutFor \fRjp2
49 .P
50 .B opj_compress -h \fRPrint a help message and exit.
51 .P
52 .R See JPWL OPTIONS for special options
53 .SH OPTIONS
54 .TP
55 .B \-\^b " n,n"
56 (Size of code block (e.g. -b 32,32). Default: 64 x 64)
57 .TP
58 .B \-\^c " n"
59 (Size of precinct (e.g. -c 128,128). Default: 2^15 x 2^15)
60 .TP
61 .B \-\^cinema2K " fps"
62 Digital Cinema 2K profile compliant codestream. Valid \fBfps\fR values are 24 or 48.
63 .TP
64 .B \-\^cinema4K
65 Digital Cinema 4K profile compliant codestream. Does not need an fps: default is 24 fps.
66 .TP
67 .B \-\^d " X,Y"
68 (Offset of image origin (e.g. -d 150,300))
69 .TP
70 .B \-\^h
71 Print a help message and exit.
72 .TP
73 .B \-\^i " name"
74 (input file name)
75 .TP
76 .B \-\^n " n"
77 (Number of resolutions. Default: 6)
78 .TP
79 .B \-\^o " name"
80 (output file name)
81 .TP
82 .B \-\^p " name"
83 Progression order. \fBname\fR can be one out of:LRCP, RLCP, RPCL, PCRL, CPRL. Default: LRCP.
84 .TP
85 .B \-\^q " n"
86 different psnr for successive layers
87 .br
88 .B Note: \fR(options -r and -q cannot be used together)
89 .TP
90 .B \-\^r " n"
91 different compression ratio(s) for successive layers. The rate specified for each quality level is the desired compression factor.
92 .br
93 .B Note: \fR(options -r and -q cannot be used together)
94 .TP
95 .B \-\^s " X,Y"
96 sub-sampling factor (e.g. -s 2,2). Default: No sub-sampling in x or y direction.
97 .br
98 .B Remark: \fRsub-sampling bigger than 2 can produce errors.
99 .TP
100 .B \-\^t " W,H"
101 (Size of tile (e.g. -t 512,512) )
102 .TP
103 .B \-\^x " name"
104 (Create index file and fill it. Default: no index file)
105 .TP
106 .B \-\^EPH
107 (Write EPH marker after each header packet. Default:no EPH)
108 .TP
109 .B \-\^F " rawWidth,rawHeight,rawComp,rawBitDepth,s_or_u"
110 characteristics of the raw input image
111 .TP
112 .B \-\^I
113 (Use the irreversible DWT 9-7. Default: Reversible DWT 5-3)
114 .TP
115 .B \-\^ImgDir " directory_name"
116 (directory containing input files)
117 .TP
118 .B \-\^M " n"
119 mode switch with values: 1, 2, 4, 8, 16, 32. Default:No mode switch activated. 
120 .br
121 \fIMeaning:\fR
122 .br
123 BYPASS(1) 
124 .br
125 RESET(2) 
126 .br
127 RESTART(4) 
128 .br
129 VSC(8) 
130 .br
131 ERTERM(16) 
132 .br
133 SEGMARK(32)
134 .br
135 Values can be added: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38
136 .TP
137 .B \-\^OutFor "ext"
138 (extension for output files)
139 .TP
140 .B \-\^POC "TtileNr=resolutionStart, componentStart, layerEnd, resolutionEnd, componentEnd, progressionOrder"
141 (see Examples)
142 .TP
143 .B \-\^ROI "c=n,U=n"
144 quantization indices upshifted for component c (0 or 1 or 2) with a value of U (>= 0 and <= 37)
145 .br
146 e.g. \fB-ROI c=0,U=25\fR
147 .TP
148 .B \-\^SOP
149 (Write SOP marker before each packet. Default: No SOP marker in the codestream.)
150 .TP
151 .B \-\^T "X,Y"
152 (Offset of the origin of the tiles (e.g. -T 100,75) )
153 .TP
154 .B \-\^W
155 (see JPWL OPTIONS)
156 .P
157 .SH JPWL OPTIONS
158 Options usable only if the library has been compiled with \fB-DUSE_JPWL\fR
159 .P
160 .B      -W h<tilepart><=type>, s<tilepart><=method>, a=<addr>, z=<size>, g=<range>, p<tilepart:pack><=type>
161 .P
162 .B h\fR selects the header error protection (EPB): \fBtype\fR can be
163    [0=none 1,absent=predefined 16=CRC-16 32=CRC-32 37-128=RS]
164    if \fBtilepart\fR is absent, it is for main and tile headers
165    if \fBtilepart\fR is present, it applies from that tile
166      onwards, up to the next h<> spec, or to the last tilepart
167      in the codestream (max. 16 specs)
168 .P
169 .B p \fRselects the packet error protection (EEP/UEP with EPBs)
170   to be applied to raw data: \fBtype\fR can be
171    [0=none 1,absent=predefined 16=CRC-16 32=CRC-32 37-128=RS]
172    if \fBtilepart:pack\fR is absent, it is from tile 0, packet 0
173    if \fBtilepart:pack\fR is present, it applies from that tile
174      and that packet onwards, up to the next packet spec
175      or to the last packet in the last tilepart in the stream
176      (max. 16 specs)
177 .P
178 .B s \fRenables sensitivity data insertion (ESD): \fBmethod\fR can be
179    [-1=NO ESD 0=RELATIVE ERROR 1=MSE 2=MSE REDUCTION 3=PSNR
180     4=PSNR INCREMENT 5=MAXERR 6=TSE 7=RESERVED]
181    if \fBtilepart\fR is absent, it is for main header only
182    if \fBtilepart\fR is present, it applies from that tile
183      onwards, up to the next s<> spec, or to the last tilepart
184      in the codestream (max. 16 specs)
185 .P
186 .B g \fRdetermines the addressing mode: \fBrange\fR can be
187    [0=PACKET 1=BYTE RANGE 2=PACKET RANGE]
188 .P
189 .B a \fRdetermines the size of data addressing: \fBaddr\fR can be
190    2/4 bytes (small/large codestreams). If not set, auto-mode
191 .P
192 .B z \fRdetermines the size of sensitivity values: \fBsize\fR can be
193    1/2 bytes, for the transformed pseudo-floating point value
194 .P
195 .SH EXAMPLES
196 .P
197 .B opj_compress -i \fRfile.bmp \fB-o \fRfile.j2k \fB-r \fR20,10,1 (compress 20x, then 10x, then lossless).
198 .P
199 .B opj_compress -i \fRfile.ppm \fB-o \fRfile.j2k \fB-q \fR30,40,50
200 .P
201 .B opj_compress -i \fRfile.pgx \fB-o \fRfile.j2k \fB-POC \fRT1=0,0,1,5,3,CPRL
202 .P
203 .B opj_compress -i \fRlena.raw \fB-o \fRlena.j2k \fB-F \fR512,512,3,8,u
204 .P
205 .SH AUTHORS
206 Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
207 .br
208 Copyright (c) 2002-2014, Professor Benoit Macq
209 .br
210 Copyright (c) 2001-2003, David Janssens
211 .br
212 Copyright (c) 2002-2003, Yannick Verschueren
213 .br
214 Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
215 .br
216 Copyright (c) 2005, Herve Drolon, FreeImage Team
217 .br
218 Copyright (c) 2006-2007, Parvatha Elangovan
219 .P
220 .SH "SEE ALSO"
221 opj_decompress(1) opj_dump(1)
222