.TH "enc_jpeg2000.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME enc_jpeg2000.c \- Encodes JPEG2000 code stream\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include 'grib2\&.h'\fP .br \fC#include 'jasper/jasper\&.h'\fP .br .SS "Macros" .in +1c .ti -1c .RI "#define \fBJAS_1_700_2\fP" .br .RI "Define for JAS\&. " .ti -1c .RI "#define \fBMAXOPTSSIZE\fP 1024" .br .RI "Maximum size of options\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBenc_jpeg2000\fP (unsigned char *cin, \fBg2int\fP width, \fBg2int\fP height, \fBg2int\fP nbits, \fBg2int\fP ltype, \fBg2int\fP ratio, \fBg2int\fP retry, char *outjpc, \fBg2int\fP jpclen)" .br .RI "This Function encodes a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i\&.e\&., ISO/IEC 15444-1) using JasPer Software version 1\&.500\&.4 (or 1\&.700\&.2) written by the University of British Columbia, Image Power Inc, and others\&. " .in -1c .SH "Detailed Description" .PP Encodes JPEG2000 code stream\&. .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-02 .RE .PP .PP Definition in file \fBenc_jpeg2000\&.c\fP\&. .SH "Macro Definition Documentation" .PP .SS "#define JAS_1_700_2" .PP Define for JAS\&. .PP Definition at line 13 of file enc_jpeg2000\&.c\&. .SS "#define MAXOPTSSIZE 1024" .PP Maximum size of options\&. .PP Definition at line 14 of file enc_jpeg2000\&.c\&. .SH "Function Documentation" .PP .SS "int enc_jpeg2000 (unsigned char * cin, \fBg2int\fP width, \fBg2int\fP height, \fBg2int\fP nbits, \fBg2int\fP ltype, \fBg2int\fP ratio, \fBg2int\fP retry, char * outjpc, \fBg2int\fP jpclen)" .PP This Function encodes a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i\&.e\&., ISO/IEC 15444-1) using JasPer Software version 1\&.500\&.4 (or 1\&.700\&.2) written by the University of British Columbia, Image Power Inc, and others\&. JasPer is available at http://www.ece.uvic.ca/~mdadams/jasper/\&. .PP PROGRAM HISTORY LOG: .IP "\(bu" 2 2002-12-02 Gilbert .IP "\(bu" 2 2004-12-16 Gilbert - Added retry argument/option to allow option of increasing the maximum number of guard bits to the JPEG2000 algorithm\&. .PP .PP \fBParameters\fP .RS 4 \fIcin\fP Packed matrix of Grayscale image values to encode\&. .br \fIwidth\fP width of image\&. .br \fIheight\fP height of image\&. .br \fInbits\fP depth (in bits) of image\&. i\&.e number of bits used to hold each data value\&. .br \fIltype\fP indicator of lossless or lossy compression\&. .IP "\(bu" 2 1, for lossy compression .IP "\(bu" 2 != 1, for lossless compression .PP .br \fIratio\fP target compression ratio\&. (ratio:1) Used only when ltype == 1\&. .br \fIretry\fP Pointer to option type\&. If 1 try increasing number of guard bits otherwise, no additional options\&. .br \fIoutjpc\fP Output encoded JPEG2000 code stream\&. .br \fIjpclen\fP Number of bytes allocated for new JPEG2000 code stream in outjpc\&. .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 > 0 = Length in bytes of encoded JPEG2000 code stream .IP "\(bu" 2 -3 = Error decode jpeg2000 code stream\&. .IP "\(bu" 2 -5 = decoded image had multiple color components\&. Only grayscale is expected\&. .PP .RE .PP \fBNote\fP .RS 4 Requires JasPer Software version 1\&.500\&.4 or 1\&.700\&.2\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2002-12-02 .RE .PP .PP Definition at line 56 of file enc_jpeg2000\&.c\&. .PP References MAXOPTSSIZE\&. .PP Referenced by jpcpack()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.