aboutsummaryrefslogtreecommitdiff
path: root/turbojpeg.h
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2010-12-14 01:21:29 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2010-12-14 01:21:29 +0000
commit4f06e6f20fd7c5bed5131677da2d40bd9753b2bc (patch)
tree4b4dbbc17399907d8e545ec8df76c16515ee4401 /turbojpeg.h
parent65f960fcdeb7e64861e876ad6933688d4e3c7b42 (diff)
Added extended tjDecompressHeader() function which can determine the type of subsampling used in the JPEG image
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@310 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'turbojpeg.h')
-rw-r--r--turbojpeg.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/turbojpeg.h b/turbojpeg.h
index e80512b..b9cb9b5 100644
--- a/turbojpeg.h
+++ b/turbojpeg.h
@@ -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);