Skip to content

Commit

Permalink
removed unneeded g2c_* jpeg functions
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Oct 3, 2023
1 parent 7554590 commit 2304285
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
26 changes: 0 additions & 26 deletions src/dec_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,32 +141,6 @@ int_dec_jpeg2000(char *injpc, g2int bufsize, void *outfld, int out_is_g2int)
return 0;
}

/**
* This Function decodes a JPEG2000 code stream specified in the
* JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using [JasPer
* Software](https://github.com/jasper-software/jasper).
*
* @param injpc Pointer to buffer that holds the input JPEG2000 code
* stream.
* @param bufsize Length (in bytes) of the buffer that holds the input
* JPEG2000 code stream.
* @param outfld Pointer to int array, already allocated, that gets
* the unpacked data.
*
* @return
* - ::G2_JASPER_DECODE Error decode jpeg2000 code stream.
* - ::G2_JASPER_DECODE_COLOR decoded image had multiple color
* components. Only grayscale is expected.
* - ::G2_JASPER_INIT Error inializing Jasper library.
*
* @author Ed Hartnett @date 9/7/22
*/
int
g2c_dec_jpeg2000(char *injpc, size_t bufsize, int *outfld)
{
return int_dec_jpeg2000(injpc, bufsize, outfld, 0);
}

/**
* This Function decodes a JPEG2000 code stream specified in the
* JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1) using [JasPer
Expand Down
42 changes: 0 additions & 42 deletions src/enc_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,6 @@ enc_jpeg2000(unsigned char *cin, g2int width, g2int height, g2int nbits,
g2int ltype, g2int ratio, g2int retry, char *outjpc,
g2int jpclen);

/**
* 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](https://github.com/jasper-software/jasper).
*
* @param cin Packed matrix of Grayscale image values to encode.
* @param width width of image.
* @param height height of image.
* @param nbits depth (in bits) of image. i.e number of bits used to
* hold each data value.
* @param ltype indicator of lossless or lossy compression.
* - 1, for lossy compression
* - != 1, for lossless compression
* @param ratio target compression ratio. (ratio:1) Used only when
* ltype == 1.
* @param retry If 1 try increasing number of guard bits.
* @param outjpc Output encoded JPEG2000 code stream.
* @param jpclen Number of bytes allocated for the output JPEG2000
* code stream in outjpc.
*
* @return
* - > 0 = Length in bytes of encoded JPEG2000 code stream
* - ::G2_JASPER_INIT Error initializing jasper library.
* - ::G2_JASPER_ENCODE Error 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
*/
int
g2c_enc_jpeg2000(unsigned char *cin, int width, int height, int nbits,
int ltype, int ratio, int retry, char *outjpc,
size_t jpclen)
{
g2int width8 = width, height8 = height, nbits8 = nbits, ltype8 = ltype;
g2int ratio8 = ratio, retry8 = retry, jpclen8 = jpclen;

return enc_jpeg2000(cin, width8, height8, nbits8, ltype8, ratio8, retry8,
outjpc, jpclen8);
}

/**
* This Function encodes a grayscale image into a JPEG2000 code stream
* specified in the JPEG2000 Part-1 standard (i.e., ISO/IEC 15444-1)
Expand Down

0 comments on commit 2304285

Please sign in to comment.