decenc_jpeg2000.c(3)
π decenc_jpeg2000.c(3) β the NCEPLIBS-g2c glow-up manual β¨
okay so bestie, you've landed on the manual page for decenc_jpeg2000.c(3) and honestly? it's giving library functions manual. buckle up, we're decoding AND encoding JPEG2000 code streams today, and no cap, it's a whole vibe. π¦
πΈ NAME
decenc_jpeg2000.c β Decode/encode a JPEG2000 code stream. literally what it says on the tin, periodt. π
β¨ SYNOPSIS
#include 'grib2_int.h'
#include 'jasper/jasper.h'
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
π Macros
#define MAXOPTSSIZE 1024β Maximum size of options. that's it, that's the macro.
π«Ά Functions
int dec_jpeg2000 (char *injpc, g2int bufsize, g2int *outfld)β Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software.int enc_jpeg2000 (unsigned char *cin, g2int width, g2int height, g2int nbits, g2int ltype, g2int ratio, g2int retry, char *outjpc, g2int jpclen)β Encode a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software.int g2c_dec_jpeg2000 (char *injpc, size_t bufsize, int *outfld)β Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software.int g2c_enc_jpeg2000 (unsigned char *cin, int width, int height, int nbits, int ltype, int ratio, int retry, char *outjpc, size_t jpclen)β Encode a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software.static int int_dec_jpeg2000 (char *injpc, g2int bufsize, void *outfld, int out_is_g2int)β Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software.
π¦ Detailed Description
Decode/encode a JPEG2000 code stream. that's the whole assignment and she ate. π
Author β Alyson Stahl π
Date β 2024-14-08 π
Definition in file decenc_jpeg2000.c.
π Macro Definition Documentation
#define MAXOPTSSIZE 1024
Maximum size of options. lowkey self-explanatory but we love her anyway.
Definition at line 12 of file decenc_jpeg2000.c.
Referenced by enc_jpeg2000().
π Function Documentation
int dec_jpeg2000 (char * injpc, g2int bufsize, g2int * outfld)
Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software. main character decode energy fr fr.
Parameters
injpcβ Pointer to buffer that holds the input JPEG2000 code stream.bufsizeβ Length (in bytes) of the buffer that holds the input JPEG2000 code stream.outfldβ Pointer tog2intarray, already allocated, that gets the unpacked data.
Returns
0Successful decode πG2_JASPER_DECODEError decode jpeg2000 code stream. πG2_JASPER_DECODE_COLORdecoded image had multiple color components. Only grayscale is expected. πG2_JASPER_INITError inializing Jasper library. (yes, "inializing" β that's what the page says, we don't fix typos here, we respect them π«Ά)
Author β Stephen Gilbert, Ed Hartnett
Definition at line 377 of file decenc_jpeg2000.c.
References int_dec_jpeg2000().
Referenced by jpcunpack_int().
int enc_jpeg2000 (unsigned char * cin, g2int width, g2int height, g2int nbits, g2int ltype, g2int ratio, g2int retry, char * outjpc, g2int jpclen)
Encode a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software. the encoder that could. β¨
- ### Program History Log
- Date β Programmer β Comments
2002-12-02β Gilbert β Initial2004-12-16β Gilbert β Added retry argument allowing increased guard bits.2022-04-15β Hartnett β Converted to usejas_instead ofjpc_functions.
Parameters
cinβ Packed matrix of Grayscale image values to encode.widthβ width of image.heightβ height of image.nbitsβ depth (in bits) of image. i.e number of bits used to hold each data value.ltypeβ indicator of lossless or lossy compression.1, for lossy compression!= 1, for lossless compression
ratioβ target compression ratio. (ratio:1) Used only whenltype == 1.retryβ If 1 try increasing number of guard bits.outjpcβ Output encoded JPEG2000 code stream.jpclenβ Number of bytes allocated for the output JPEG2000 code stream inoutjpc.
Returns
> 0= Length in bytes of encoded JPEG2000 code stream π₯G2_JASPER_INITError initializing jasper library.G2_JASPER_ENCODEError encode jpeg2000 code stream.
Note β Requires JasPer Software version 1.500.4 or 1.700.2 or later. not negotiable bestie, check ur version. π
Author β Stephen Gilbert
Date β 2002-12-02
Author β Ed Hartnett
Definition at line 94 of file decenc_jpeg2000.c.
References G2_JASPER_ENCODE, G2_JASPER_INIT, G2C_JASPER_JPEG_FORMAT_NAME, LOG, and MAXOPTSSIZE.
Referenced by g2c_enc_jpeg2000(), and jpcpack_int().
int g2c_dec_jpeg2000 (char * injpc, size_t bufsize, int * outfld)
Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software. same decode plot, size_t/int flavored. π
Parameters
injpcβ Pointer to buffer that holds the input JPEG2000 code stream.bufsizeβ Length (in bytes) of the buffer that holds the input JPEG2000 code stream.outfldβ Pointer tointarray, already allocated, that gets the unpacked data.
Returns
G2C_NOERRORNo error. πG2_JASPER_DECODEError decode jpeg2000 code stream.G2_JASPER_DECODE_COLORdecoded image had multiple color components. Only grayscale is expected.G2_JASPER_INITError inializing Jasper library.
Author β Ed Hartnett
Date β 9/7/22
Definition at line 350 of file decenc_jpeg2000.c.
References int_dec_jpeg2000().
int g2c_enc_jpeg2000 (unsigned char * cin, int width, int height, int nbits, int ltype, int ratio, int retry, char * outjpc, size_t jpclen)
Encode a grayscale image into a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software. she's the int-typed sister of enc_jpeg2000 and she's slaying. π
Parameters
cinβ Packed matrix of Grayscale image values to encode.widthβ width of image.heightβ height of image.nbitsβ depth (in bits) of image. i.e number of bits used to hold each data value.ltypeβ indicator of lossless or lossy compression.1, for lossy compression!= 1, for lossless compression
ratioβ target compression ratio. (ratio:1) Used only whenltype == 1.retryβ If 1 try increasing number of guard bits.outjpcβ Output encoded JPEG2000 code stream.jpclenβ Number of bytes allocated for the output JPEG2000 code stream inoutjpc.
Returns
> 0= Length in bytes of encoded JPEG2000 code streamG2_JASPER_INITError initializing jasper library.G2_JASPER_ENCODEError encode jpeg2000 code stream.
Note β Requires JasPer Software version 1.500.4 or 1.700.2 or later.
Author β Stephen Gilbert
Date β 2002-12-02
Author β Ed Hartnett
Definition at line 45 of file decenc_jpeg2000.c.
References enc_jpeg2000().
int int_dec_jpeg2000 (char * injpc, g2int bufsize, void * outfld, int out_is_g2int) [static]
Decode a JPEG2000 code stream specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using JasPer Software. she's static, she's internal, she's the backbone of the whole decode situation. π§
Parameters
injpcβ Pointer to buffer that holds the input JPEG2000 code stream.bufsizeβ Length (in bytes) of the buffer that holds the input JPEG2000 code stream.outfldβ Pointer to eitherintorg2intarray, already allocated, that gets the unpacked data.out_is_g2intβ Non-zero if the output array is of typeg2int(i.e. 64-bit ints), zero if output is anintarray (32-bits).
Returns
0Successful decodeG2_JASPER_DECODEError decode jpeg2000 code stream.G2_JASPER_DECODE_COLORdecoded image had multiple color components. Only grayscale is expected.G2_JASPER_INITError inializing Jasper library.
Author β Stephen Gilbert
Date β 2002-12-02
Author β Ed Hartnett
Author β Eric Engle
Definition at line 221 of file decenc_jpeg2000.c.
References G2_JASPER_DECODE, G2_JASPER_DECODE_COLOR, G2_JASPER_INIT, G2C_JASPER_JPEG_FORMAT_NAME, G2C_JASPER_MAX_MEM, and LOG.
Referenced by dec_jpeg2000(), and g2c_dec_jpeg2000().
π Author
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code. (the robot did the writing, we just did the vibes π)
and that's the whole page, bestie!! π this masterpiece comes to you courtesy of NCEPLIBS-g2c, Version 2.3.0, dated with the page decenc_jpeg2000.c(3) β go forth and encode/decode, you've got this, iykyk π¦β¨π
π¦ where this page comes from
- ubuntu resolute: libg2c-dev 2.3.0-4 Β· LGPL-3.0-only
- ubuntu stonking: libg2c-dev 2.3.0-7 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms