.TH "jpcunpack.c" 3 "Fri Jun 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME jpcunpack.c \- Unpack a data field that was packed into a JPEG2000 code stream\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include 'grib2\&.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "int \fBdec_jpeg2000\fP (char *, \fBg2int\fP, \fBg2int\fP *)" .br .RI "This Function decodes 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 and Image Power Inc, and others\&. " .ti -1c .RI "\fBg2int\fP \fBjpcunpack\fP (unsigned char *cpack, \fBg2int\fP len, \fBg2int\fP *idrstmpl, \fBg2int\fP ndpts, \fBg2float\fP *fld)" .br .RI "This subroutine unpacks a data field that was packed into a JPEG2000 code stream using info from the GRIB2 Data Representation Template 5\&.40 or 5\&.40000\&. " .in -1c .SH "Detailed Description" .PP Unpack a data field that was packed into a JPEG2000 code stream\&. .PP \fBAuthor\fP .RS 4 Stephem Gilbert .RE .PP \fBDate\fP .RS 4 2003-08-27 .RE .PP .PP Definition in file \fBjpcunpack\&.c\fP\&. .SH "Function Documentation" .PP .SS "int dec_jpeg2000 (char * injpc, \fBg2int\fP bufsize, \fBg2int\fP * outfld)" .PP This Function decodes 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 and Image Power Inc, and others\&. JasPer is available at http://www.ece.uvic.ca/~mdadams/jasper/\&. .PP \fBParameters\fP .RS 4 \fIinjpc\fP Input JPEG2000 code stream\&. .br \fIbufsize\fP Length (in bytes) of the input JPEG2000 code stream\&. .br \fIoutfld\fP Output matrix of grayscale image values\&. .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 0 Successful decode .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 43 of file dec_jpeg2000\&.c\&. .PP Referenced by jpcunpack()\&. .SS "\fBg2int\fP jpcunpack (unsigned char * cpack, \fBg2int\fP len, \fBg2int\fP * idrstmpl, \fBg2int\fP ndpts, \fBg2float\fP * fld)" .PP This subroutine unpacks a data field that was packed into a JPEG2000 code stream using info from the GRIB2 Data Representation Template 5\&.40 or 5\&.40000\&. .PP \fBParameters\fP .RS 4 \fIcpack\fP The packed data field (character*1 array)\&. .br \fIlen\fP length of packed field cpack\&. .br \fIidrstmpl\fP Pointer to array of values for Data Representation Template 5\&.40 or 5\&.40000\&. .br \fIndpts\fP The number of data values to unpack\&. .br \fIfld\fP Contains the unpacked data values\&. .RE .PP \fBReturns\fP .RS 4 0 for success, 1 for memory allocation error\&. .RE .PP \fBAuthor\fP .RS 4 Stephem Gilbert .RE .PP \fBDate\fP .RS 4 2003-08-27 .RE .PP .PP Definition at line 29 of file jpcunpack\&.c\&. .PP References dec_jpeg2000(), int_power(), and rdieee()\&. .PP Referenced by g2_unpack7()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.