diff options
author | DRC <dcommander@users.sourceforge.net> | 2010-10-08 08:05:44 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2010-10-08 08:05:44 +0000 |
commit | 36a6eec93250e390d1028b3372078810b4428eaf (patch) | |
tree | 2b769f02f8cfb3199cbcd37f09930de4b17f7dad /jcapimin.c | |
parent | e5d7bc9f931dc0dc25707affc0754d3e99be481d (diff) | |
parent | a4ecaacde6d64e1f20b8647546813c17592016c1 (diff) |
Added optional emulation of the jpeg-7 or jpeg-8b API/ABI's
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@236 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jcapimin.c')
-rw-r--r-- | jcapimin.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2,6 +2,7 @@ * jcapimin.c * * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 2003-2010 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -63,14 +64,25 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) cinfo->comp_info = NULL; - for (i = 0; i < NUM_QUANT_TBLS; i++) + for (i = 0; i < NUM_QUANT_TBLS; i++) { cinfo->quant_tbl_ptrs[i] = NULL; +#if JPEG_LIB_VERSION >= 70 + cinfo->q_scale_factor[i] = 100; +#endif + } for (i = 0; i < NUM_HUFF_TBLS; i++) { cinfo->dc_huff_tbl_ptrs[i] = NULL; cinfo->ac_huff_tbl_ptrs[i] = NULL; } +#if JPEG_LIB_VERSION >= 80 + /* Must do it here for emit_dqt in case jpeg_write_tables is used */ + cinfo->block_size = DCTSIZE; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; +#endif + cinfo->script_space = NULL; cinfo->input_gamma = 1.0; /* in case application forgets */ |