aboutsummaryrefslogtreecommitdiff
path: root/jdatadst.c
diff options
context:
space:
mode:
Diffstat (limited to 'jdatadst.c')
-rw-r--r--jdatadst.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/jdatadst.c b/jdatadst.c
index 472d5f32..2f488696 100644
--- a/jdatadst.c
+++ b/jdatadst.c
@@ -40,6 +40,7 @@ typedef my_destination_mgr * my_dest_ptr;
#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
+#if JPEG_LIB_VERSION >= 80
/* Expanded data destination object for memory output */
typedef struct {
@@ -53,6 +54,7 @@ typedef struct {
} my_mem_destination_mgr;
typedef my_mem_destination_mgr * my_mem_dest_ptr;
+#endif
/*
@@ -74,11 +76,13 @@ init_destination (j_compress_ptr cinfo)
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
}
+#if JPEG_LIB_VERSION >= 80
METHODDEF(void)
init_mem_destination (j_compress_ptr cinfo)
{
/* no work necessary here */
}
+#endif
/*
@@ -119,6 +123,7 @@ empty_output_buffer (j_compress_ptr cinfo)
return TRUE;
}
+#if JPEG_LIB_VERSION >= 80
METHODDEF(boolean)
empty_mem_output_buffer (j_compress_ptr cinfo)
{
@@ -148,6 +153,7 @@ empty_mem_output_buffer (j_compress_ptr cinfo)
return TRUE;
}
+#endif
/*
@@ -176,6 +182,7 @@ term_destination (j_compress_ptr cinfo)
ERREXIT(cinfo, JERR_FILE_WRITE);
}
+#if JPEG_LIB_VERSION >= 80
METHODDEF(void)
term_mem_destination (j_compress_ptr cinfo)
{
@@ -184,6 +191,7 @@ term_mem_destination (j_compress_ptr cinfo)
*dest->outbuffer = dest->buffer;
*dest->outsize = dest->bufsize - dest->pub.free_in_buffer;
}
+#endif
/*
@@ -217,6 +225,7 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
}
+#if JPEG_LIB_VERSION >= 80
/*
* Prepare for output to a memory buffer.
* The caller may supply an own initial buffer with appropriate size.
@@ -265,3 +274,4 @@ jpeg_mem_dest (j_compress_ptr cinfo,
dest->pub.next_output_byte = dest->buffer = *outbuffer;
dest->pub.free_in_buffer = dest->bufsize = *outsize;
}
+#endif