Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97f8ec4b60 | ||
|
|
1e6b5b4884 | ||
|
|
ae19bf6f15 | ||
|
|
e885a8bf41 | ||
|
|
0b7d4ed792 | ||
|
|
10a094f0e6 | ||
|
|
f8b77c44f1 | ||
|
|
048990944f | ||
|
|
d3c7eff53d |
7
ChangeLog.txt
Normal file
7
ChangeLog.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Significant changes since 0.0.90
|
||||||
|
================================
|
||||||
|
|
||||||
|
[1] Added documentation to .deb packages
|
||||||
|
|
||||||
|
[2] 2968313: Fixed data corruption issues when decompressing large JPEG images
|
||||||
|
and/or using buffered I/O with the libjpeg-turbo decompressor
|
||||||
@@ -82,7 +82,8 @@ DISTMANS= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
|
|||||||
|
|
||||||
DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \
|
DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \
|
||||||
structure.doc coderules.doc filelist.doc jconfig.doc change.log \
|
structure.doc coderules.doc filelist.doc jconfig.doc change.log \
|
||||||
README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt
|
README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt \
|
||||||
|
ChangeLog.txt
|
||||||
|
|
||||||
TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \
|
TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \
|
||||||
testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm
|
testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm
|
||||||
|
|||||||
@@ -28,8 +28,13 @@ libraries can be used as drop-in replacements for libjpeg on most systems.
|
|||||||
Some of the optimizations to the Huffman encoder/decoder were borrowed from
|
Some of the optimizations to the Huffman encoder/decoder were borrowed from
|
||||||
VirtualGL, and thus the libjpeg-turbo distribution, as a whole, falls under the
|
VirtualGL, and thus the libjpeg-turbo distribution, as a whole, falls under the
|
||||||
wxWindows Library Licence, Version 3.1. A copy of this license can be found in
|
wxWindows Library Licence, Version 3.1. A copy of this license can be found in
|
||||||
this directory under LICENSE.txt. The rest of the source code, apart from
|
this directory under LICENSE.txt. The wxWindows Library License is based on
|
||||||
these modifications, falls under a less restrictive license (see README.)
|
the LGPL but includes provisions which allow the Library to be statically
|
||||||
|
linked into proprietary libraries and applications without requiring the
|
||||||
|
resulting binaries to be distributed under the terms of the LGPL.
|
||||||
|
|
||||||
|
The rest of the source code, apart from these modifications, falls under a less
|
||||||
|
restrictive, BSD-style license (see README.)
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ([2.56])
|
AC_PREREQ([2.56])
|
||||||
AC_INIT([libjpeg-turbo], [0.0.90])
|
AC_INIT([libjpeg-turbo], [0.0.91])
|
||||||
BUILD=`date +%Y%m%d`
|
BUILD=`date +%Y%m%d`
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
||||||
|
|||||||
10
jchuff.c
10
jchuff.c
@@ -49,7 +49,7 @@ int jpeg_first_bit_table_init=0;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long put_buffer; /* current bit-accumulation buffer */
|
size_t put_buffer; /* current bit-accumulation buffer */
|
||||||
int put_bits; /* # of bits now in it */
|
int put_bits; /* # of bits now in it */
|
||||||
int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
|
int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
|
||||||
} savable_state;
|
} savable_state;
|
||||||
@@ -489,8 +489,8 @@ LOCAL(boolean)
|
|||||||
flush_bits (working_state * state)
|
flush_bits (working_state * state)
|
||||||
{
|
{
|
||||||
unsigned char _buffer[BUFSIZE], *buffer;
|
unsigned char _buffer[BUFSIZE], *buffer;
|
||||||
long put_buffer; int put_bits;
|
size_t put_buffer; int put_bits;
|
||||||
int bytes, bytestocopy, localbuf = 0;
|
size_t bytes, bytestocopy; int localbuf = 0;
|
||||||
|
|
||||||
put_buffer = state->cur.put_buffer;
|
put_buffer = state->cur.put_buffer;
|
||||||
put_bits = state->cur.put_bits;
|
put_bits = state->cur.put_bits;
|
||||||
@@ -515,9 +515,9 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
|||||||
int nbits;
|
int nbits;
|
||||||
int r, sflag, size, code;
|
int r, sflag, size, code;
|
||||||
unsigned char _buffer[BUFSIZE], *buffer;
|
unsigned char _buffer[BUFSIZE], *buffer;
|
||||||
long put_buffer; int put_bits;
|
size_t put_buffer; int put_bits;
|
||||||
int code_0xf0 = actbl->ehufco[0xf0], size_0xf0 = actbl->ehufsi[0xf0];
|
int code_0xf0 = actbl->ehufco[0xf0], size_0xf0 = actbl->ehufsi[0xf0];
|
||||||
int bytes, bytestocopy, localbuf = 0;
|
size_t bytes, bytestocopy; int localbuf = 0;
|
||||||
|
|
||||||
put_buffer = state->cur.put_buffer;
|
put_buffer = state->cur.put_buffer;
|
||||||
put_bits = state->cur.put_bits;
|
put_bits = state->cur.put_bits;
|
||||||
|
|||||||
7
jdhuff.c
7
jdhuff.c
@@ -765,20 +765,25 @@ METHODDEF(boolean)
|
|||||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
|
int usefast = 1;
|
||||||
|
|
||||||
/* Process restart marker if needed; may have to suspend */
|
/* Process restart marker if needed; may have to suspend */
|
||||||
if (cinfo->restart_interval) {
|
if (cinfo->restart_interval) {
|
||||||
if (entropy->restarts_to_go == 0)
|
if (entropy->restarts_to_go == 0)
|
||||||
if (! process_restart(cinfo))
|
if (! process_restart(cinfo))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
usefast = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cinfo->src->bytes_in_buffer < BUFSIZE * cinfo->blocks_in_MCU)
|
||||||
|
usefast = 0;
|
||||||
|
|
||||||
/* If we've run out of data, just leave the MCU set to zeroes.
|
/* If we've run out of data, just leave the MCU set to zeroes.
|
||||||
* This way, we return uniform gray for the remainder of the segment.
|
* This way, we return uniform gray for the remainder of the segment.
|
||||||
*/
|
*/
|
||||||
if (! entropy->pub.insufficient_data) {
|
if (! entropy->pub.insufficient_data) {
|
||||||
|
|
||||||
if (cinfo->src->bytes_in_buffer >= BUFSIZE) {
|
if (usefast) {
|
||||||
if (!decode_mcu_fast(cinfo, MCU_data)) return FALSE;
|
if (!decode_mcu_fast(cinfo, MCU_data)) return FALSE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
2
jdhuff.h
2
jdhuff.h
@@ -75,7 +75,7 @@ EXTERN(void) jpeg_make_d_derived_tbl
|
|||||||
|
|
||||||
#if __WORDSIZE == 64
|
#if __WORDSIZE == 64
|
||||||
|
|
||||||
typedef long bit_buf_type; /* type of bit-extraction buffer */
|
typedef size_t bit_buf_type; /* type of bit-extraction buffer */
|
||||||
#define BIT_BUF_SIZE 64 /* size of buffer in bits */
|
#define BIT_BUF_SIZE 64 /* size of buffer in bits */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
16
jmemmgr.c
16
jmemmgr.c
@@ -122,7 +122,7 @@ typedef struct {
|
|||||||
jvirt_barray_ptr virt_barray_list;
|
jvirt_barray_ptr virt_barray_list;
|
||||||
|
|
||||||
/* This counts total space obtained from jpeg_get_small/large */
|
/* This counts total space obtained from jpeg_get_small/large */
|
||||||
long total_space_allocated;
|
size_t total_space_allocated;
|
||||||
|
|
||||||
/* alloc_sarray and alloc_barray set this value for use by virtual
|
/* alloc_sarray and alloc_barray set this value for use by virtual
|
||||||
* array routines.
|
* array routines.
|
||||||
@@ -317,8 +317,8 @@ alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
|
|||||||
/* OK, allocate the object from the current pool */
|
/* OK, allocate the object from the current pool */
|
||||||
data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
|
data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
|
||||||
data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
|
data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
|
||||||
if ((unsigned long)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
|
if ((size_t)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
|
||||||
data_ptr += ALIGN_SIZE - (unsigned long)data_ptr % ALIGN_SIZE;
|
data_ptr += ALIGN_SIZE - (size_t)data_ptr % ALIGN_SIZE;
|
||||||
data_ptr += hdr_ptr->bytes_used; /* point to place for object */
|
data_ptr += hdr_ptr->bytes_used; /* point to place for object */
|
||||||
hdr_ptr->bytes_used += sizeofobject;
|
hdr_ptr->bytes_used += sizeofobject;
|
||||||
hdr_ptr->bytes_left -= sizeofobject;
|
hdr_ptr->bytes_left -= sizeofobject;
|
||||||
@@ -382,8 +382,8 @@ alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
|
|||||||
|
|
||||||
data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
|
data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
|
||||||
data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
|
data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
|
||||||
if ((unsigned long)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
|
if ((size_t)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
|
||||||
data_ptr += ALIGN_SIZE - (unsigned long)data_ptr % ALIGN_SIZE;
|
data_ptr += ALIGN_SIZE - (size_t)data_ptr % ALIGN_SIZE;
|
||||||
|
|
||||||
return (void FAR *) data_ptr;
|
return (void FAR *) data_ptr;
|
||||||
}
|
}
|
||||||
@@ -420,7 +420,7 @@ alloc_sarray (j_common_ptr cinfo, int pool_id,
|
|||||||
/* Make sure each row is properly aligned */
|
/* Make sure each row is properly aligned */
|
||||||
if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
|
if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
|
||||||
out_of_memory(cinfo, 5); /* safety check */
|
out_of_memory(cinfo, 5); /* safety check */
|
||||||
samplesperrow = jround_up(samplesperrow, (2 * ALIGN_SIZE) / SIZEOF(JSAMPLE));
|
samplesperrow = (JDIMENSION)jround_up(samplesperrow, (2 * ALIGN_SIZE) / SIZEOF(JSAMPLE));
|
||||||
|
|
||||||
/* Calculate max # of rows allowed in one allocation chunk */
|
/* Calculate max # of rows allowed in one allocation chunk */
|
||||||
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
||||||
@@ -608,8 +608,8 @@ realize_virt_arrays (j_common_ptr cinfo)
|
|||||||
/* Allocate the in-memory buffers for any unrealized virtual arrays */
|
/* Allocate the in-memory buffers for any unrealized virtual arrays */
|
||||||
{
|
{
|
||||||
my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
|
my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
|
||||||
long space_per_minheight, maximum_space, avail_mem;
|
size_t space_per_minheight, maximum_space, avail_mem;
|
||||||
long minheights, max_minheights;
|
size_t minheights, max_minheights;
|
||||||
jvirt_sarray_ptr sptr;
|
jvirt_sarray_ptr sptr;
|
||||||
jvirt_barray_ptr bptr;
|
jvirt_barray_ptr bptr;
|
||||||
|
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
|
|||||||
* Here we always say, "we got all you want bud!"
|
* Here we always say, "we got all you want bud!"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(long)
|
GLOBAL(size_t)
|
||||||
jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
|
jpeg_mem_available (j_common_ptr cinfo, size_t min_bytes_needed,
|
||||||
long max_bytes_needed, long already_allocated)
|
size_t max_bytes_needed, size_t already_allocated)
|
||||||
{
|
{
|
||||||
return max_bytes_needed;
|
return max_bytes_needed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
|
|||||||
* Conversely, zero may be returned to always use the minimum amount of memory.
|
* Conversely, zero may be returned to always use the minimum amount of memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
|
EXTERN(size_t) jpeg_mem_available JPP((j_common_ptr cinfo,
|
||||||
long min_bytes_needed,
|
size_t min_bytes_needed,
|
||||||
long max_bytes_needed,
|
size_t max_bytes_needed,
|
||||||
long already_allocated));
|
size_t already_allocated));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
|||||||
|
|
||||||
/* Utility routines in jutils.c */
|
/* Utility routines in jutils.c */
|
||||||
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
||||||
EXTERN(long) jround_up JPP((long a, long b));
|
EXTERN(size_t) jround_up JPP((size_t a, size_t b));
|
||||||
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
||||||
JSAMPARRAY output_array, int dest_row,
|
JSAMPARRAY output_array, int dest_row,
|
||||||
int num_rows, JDIMENSION num_cols));
|
int num_rows, JDIMENSION num_cols));
|
||||||
|
|||||||
4
jutils.c
4
jutils.c
@@ -77,8 +77,8 @@ jdiv_round_up (long a, long b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLOBAL(long)
|
GLOBAL(size_t)
|
||||||
jround_up (long a, long b)
|
jround_up (size_t a, size_t b)
|
||||||
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
|
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
|
||||||
/* Assumes a >= 0, b > 0 */
|
/* Assumes a >= 0, b > 0 */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ mv $TMPDIR/opt/$PACKAGE_NAME/$__LIB/libturbojpeg.* $TMPDIR/usr/$__LIB
|
|||||||
/sbin/ldconfig -n $TMPDIR/usr/$__LIB
|
/sbin/ldconfig -n $TMPDIR/usr/$__LIB
|
||||||
mkdir -p $TMPDIR/usr/include
|
mkdir -p $TMPDIR/usr/include
|
||||||
mv $TMPDIR/opt/$PACKAGE_NAME/include/turbojpeg.h $TMPDIR/usr/include
|
mv $TMPDIR/opt/$PACKAGE_NAME/include/turbojpeg.h $TMPDIR/usr/include
|
||||||
|
mkdir -p $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
install -m 644 $SRCDIR/LICENSE.txt $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
install -m 644 $SRCDIR/LGPL.txt $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
install -m 644 $SRCDIR/README-turbo.txt $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
install -m 644 $SRCDIR/README $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
install -m 644 $SRCDIR/libjpeg.doc $TMPDIR/usr/share/doc/$PACKAGE_NAME-$VERSION
|
||||||
|
|
||||||
sudo chown -Rh root:root $TMPDIR/*
|
sudo chown -Rh root:root $TMPDIR/*
|
||||||
dpkg -b $TMPDIR $PACKAGE_NAME\_$DEBARCH.deb
|
dpkg -b $TMPDIR $PACKAGE_NAME\_$DEBARCH.deb
|
||||||
|
|||||||
3
rrutil.h
3
rrutil.h
@@ -1,5 +1,6 @@
|
|||||||
/* Copyright (C)2004 Landmark Graphics Corporation
|
/* Copyright (C)2004 Landmark Graphics Corporation
|
||||||
* Copyright (C)2005 Sun Microsystems, Inc.
|
* Copyright (C)2005 Sun Microsystems, Inc.
|
||||||
|
* Copyright (C)2010 D. R. Commander
|
||||||
*
|
*
|
||||||
* This library is free software and may be redistributed and/or modified under
|
* This library is free software and may be redistributed and/or modified under
|
||||||
* the terms of the wxWindows Library License, Version 3.1 or (at your option)
|
* the terms of the wxWindows Library License, Version 3.1 or (at your option)
|
||||||
@@ -49,7 +50,7 @@ static __inline int numprocs(void)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
DWORD_PTR ProcAff, SysAff, i; int count=0;
|
DWORD_PTR ProcAff, SysAff, i; int count=0;
|
||||||
if(!GetProcessAffinityMask(GetCurrentProcess(), &ProcAff, &SysAff)) return(1);
|
if(!GetProcessAffinityMask(GetCurrentProcess(), &ProcAff, &SysAff)) return(1);
|
||||||
for(i=0; i<sizeof(long)*8; i++) if(ProcAff&(1<<i)) count++;
|
for(i=0; i<sizeof(long*)*8; i++) if(ProcAff&(1LL<<i)) count++;
|
||||||
return(count);
|
return(count);
|
||||||
#elif defined (__APPLE__)
|
#elif defined (__APPLE__)
|
||||||
return(1);
|
return(1);
|
||||||
|
|||||||
@@ -48,16 +48,16 @@ init_simd (void)
|
|||||||
/* Force different settings through environment variables */
|
/* Force different settings through environment variables */
|
||||||
env = getenv("JSIMD_FORCEMMX");
|
env = getenv("JSIMD_FORCEMMX");
|
||||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
simd_support = JSIMD_MMX;
|
simd_support &= JSIMD_MMX;
|
||||||
env = getenv("JSIMD_FORCE3DNOW");
|
env = getenv("JSIMD_FORCE3DNOW");
|
||||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
simd_support = JSIMD_3DNOW|JSIMD_MMX;
|
simd_support &= JSIMD_3DNOW|JSIMD_MMX;
|
||||||
env = getenv("JSIMD_FORCESSE");
|
env = getenv("JSIMD_FORCESSE");
|
||||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
simd_support = JSIMD_SSE|JSIMD_MMX;
|
simd_support &= JSIMD_SSE|JSIMD_MMX;
|
||||||
env = getenv("JSIMD_FORCESSE2");
|
env = getenv("JSIMD_FORCESSE2");
|
||||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||||
simd_support = JSIMD_SSE2;
|
simd_support &= JSIMD_SSE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLOBAL(int)
|
GLOBAL(int)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* In the PIC cases, we have no guarantee that constants will keep
|
* In the PIC cases, we have no guarantee that constants will keep
|
||||||
* their alignment. This macro allows us to verify it at runtime.
|
* their alignment. This macro allows us to verify it at runtime.
|
||||||
*/
|
*/
|
||||||
#define IS_ALIGNED(ptr, order) (((unsigned long)ptr & ((1 << order) - 1)) == 0)
|
#define IS_ALIGNED(ptr, order) (((size_t)ptr & ((1 << order) - 1)) == 0)
|
||||||
|
|
||||||
#define IS_ALIGNED_SSE(ptr) (IS_ALIGNED(ptr, 4)) /* 16 byte alignment */
|
#define IS_ALIGNED_SSE(ptr) (IS_ALIGNED(ptr, 4)) /* 16 byte alignment */
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,8 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
|
|||||||
j->cinfo.image_height-j->cinfo.next_scanline);
|
j->cinfo.image_height-j->cinfo.next_scanline);
|
||||||
}
|
}
|
||||||
jpeg_finish_compress(&j->cinfo);
|
jpeg_finish_compress(&j->cinfo);
|
||||||
*size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height)-(j->jdms.free_in_buffer);
|
*size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height)
|
||||||
|
-(unsigned long)(j->jdms.free_in_buffer);
|
||||||
|
|
||||||
if(row_pointer) free(row_pointer);
|
if(row_pointer) free(row_pointer);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user