Added extended tjDecompressHeader() function which can determine the type of subsampling used in the JPEG image

This commit is contained in:
DRC
2010-12-14 01:21:29 +00:00
parent 55a9cbffe7
commit f0d2577482
2 changed files with 66 additions and 2 deletions

View File

@@ -169,9 +169,9 @@ DLLEXPORT tjhandle DLLCALL tjInitDecompress(void);
/*
int tjDecompressHeader(tjhandle j,
int tjDecompressHeader2(tjhandle j,
unsigned char *srcbuf, unsigned long size,
int *width, int *height)
int *width, int *height, int *jpegsub)
[INPUT] j = instance handle previously returned from a call to
tjInitDecompress()
@@ -180,9 +180,18 @@ DLLEXPORT tjhandle DLLCALL tjInitDecompress(void);
[INPUT] size = size of the JPEG image buffer (in bytes)
[OUTPUT] width = width (in pixels) of the JPEG image
[OUTPUT] height = height (in pixels) of the JPEG image
[OUTPUT] jpegsub = type of chrominance subsampling used when compressing the
JPEG image
RETURNS: 0 on success, -1 on error
*/
DLLEXPORT int DLLCALL tjDecompressHeader2(tjhandle j,
unsigned char *srcbuf, unsigned long size,
int *width, int *height, int *jpegsub);
/*
Deprecated version of the above function
*/
DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle j,
unsigned char *srcbuf, unsigned long size,
int *width, int *height);