15ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/*
25ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * transupp.h
35ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
45033f3e19a31e8ad40c1a79700365aefe5664494DRC * This file was part of the Independent JPEG Group's software:
55829cb23983cd241c48abd8ed70ff3627560c453Guido Vollbeding * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding.
65033f3e19a31e8ad40c1a79700365aefe5664494DRC * It was modified by The libjpeg-turbo Project to include only code relevant
75033f3e19a31e8ad40c1a79700365aefe5664494DRC * to libjpeg-turbo.
86eb7d3798b5a79347c62825fc4c16f7ce673bdd0Alex Naidis * For conditions of distribution and use, see the accompanying README.ijg
96eb7d3798b5a79347c62825fc4c16f7ce673bdd0Alex Naidis * file.
105ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
115ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * This file contains declarations for image transformation routines and
125ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * other utility code used by the jpegtran sample application.  These are
135ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * NOT part of the core JPEG library.  But we keep these routines separate
145ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * from jpegtran.c to ease the task of maintaining jpegtran-like programs
155ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * that have other user interfaces.
165ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
175ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * NOTE: all the routines declared here have very specific requirements
185ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * about when they are to be executed during the reading and writing of the
195ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * source and destination files.  See the comments in transupp.c, or see
205ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * jpegtran.c for an example of correct usage.
215ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane */
225ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
235ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* If you happen not to want the image transform support, disable it here */
245ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane#ifndef TRANSFORMS_SUPPORTED
25b775351012af176720429ac21d11682a0b75b4b7DRC#define TRANSFORMS_SUPPORTED 1          /* 0 disables transform code */
265ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane#endif
275ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
285ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/*
295ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * Although rotating and flipping data expressed as DCT coefficients is not
305ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * hard, there is an asymmetry in the JPEG format specification for images
315ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * whose dimensions aren't multiples of the iMCU size.  The right and bottom
325ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * image edges are padded out to the next iMCU boundary with junk data; but
335ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * no padding is possible at the top and left edges.  If we were to flip
345ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * the whole image including the pad data, then pad garbage would become
355ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * visible at the top and/or left, and real pixels would disappear into the
365ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * pad margins --- perhaps permanently, since encoders & decoders may not
375ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * bother to preserve DCT blocks that appear to be completely outside the
385ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * nominal image area.  So, we have to exclude any partial iMCUs from the
395ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * basic transformation.
405ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
415ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * Transpose is the only transformation that can handle partial iMCUs at the
425ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * right and bottom edges completely cleanly.  flip_h can flip partial iMCUs
435ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * at the bottom, but leaves any partial iMCUs at the right edge untouched.
445ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched.
455ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * The other transforms are defined as combinations of these basic transforms
465ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * and process edge blocks in a way that preserves the equivalence.
475ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
485ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * The "trim" option causes untransformable partial iMCUs to be dropped;
495ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * this is not strictly lossless, but it usually gives the best-looking
505ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * result for odd-size images.  Note that when this option is active,
515ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * the expected mathematical equivalences between the transforms may not hold.
525ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim
535ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * followed by -rot 180 -trim trims both edges.)
545ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane *
555996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * We also offer a lossless-crop option, which discards data outside a given
565996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * image region but losslessly preserves what is inside.  Like the rotate and
575996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * flip transforms, lossless crop is restricted by the JPEG format: the upper
585996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * left corner of the selected region must fall on an iMCU boundary.  If this
595996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * does not hold for the given crop parameters, we silently move the upper left
605996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * corner up and/or left to make it so, simultaneously increasing the region
615996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * dimensions to keep the lower right crop corner unchanged.  (Thus, the
625996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * output image covers at least the requested region, but may cover more.)
635829cb23983cd241c48abd8ed70ff3627560c453Guido Vollbeding * The adjustment of the region dimensions may be optionally disabled.
645996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding *
65989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * We also provide a lossless-resize option, which is kind of a lossless-crop
66989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * operation in the DCT coefficient block domain - it discards higher-order
67989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * coefficients and losslessly preserves lower-order coefficients of a
68989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * sub-block.
69989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding *
70989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * Rotate/flip transform, resize, and crop can be requested together in a
71989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * single invocation.  The crop is applied last --- that is, the crop region
72989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding * is specified in terms of the destination image after transform/resize.
735996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding *
745ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * We also offer a "force to grayscale" option, which simply discards the
755ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * chrominance channels of a YCbCr image.  This is lossless in the sense that
765ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * the luminance channel is preserved exactly.  It's not the same kind of
775ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * thing as the rotate/flip transformations, but it's convenient to handle it
785ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * as part of this package, mainly because the transformation routines have to
795ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * be aware of the option to know how many components to work on.
805ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane */
815ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
825996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
835996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/*
845996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * Codes for supported types of image transformations.
855996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding */
865996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
875996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbedingtypedef enum {
88333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_NONE,            /* no transformation */
89333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_FLIP_H,          /* horizontal flip */
90333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_FLIP_V,          /* vertical flip */
91333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_TRANSPOSE,       /* transpose across UL-to-LR axis */
92333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_TRANSVERSE,      /* transpose across UR-to-LL axis */
93333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_ROT_90,          /* 90-degree clockwise rotation */
94333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_ROT_180,         /* 180-degree rotation */
95333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JXFORM_ROT_270          /* 270-degree clockwise (or 90 ccw) */
965996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding} JXFORM_CODE;
975996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
985996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/*
995996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * Codes for crop parameters, which can individually be unspecified,
1005829cb23983cd241c48abd8ed70ff3627560c453Guido Vollbeding * positive or negative for xoffset or yoffset,
1015829cb23983cd241c48abd8ed70ff3627560c453Guido Vollbeding * positive or forced for width or height.
1025996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding */
1035996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
1045996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbedingtypedef enum {
105333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCROP_UNSET,
106333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCROP_POS,
107333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCROP_NEG,
108333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCROP_FORCE
1095996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding} JCROP_CODE;
1105996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
1115996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/*
1125996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * Transform parameters struct.
1135996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * NB: application must not change any elements of this struct after
1145996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * calling jtransform_request_workspace.
1155996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding */
1165996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
1175ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lanetypedef struct {
1185ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane  /* Options: set by caller */
119b775351012af176720429ac21d11682a0b75b4b7DRC  JXFORM_CODE transform;        /* image transform operator */
120b775351012af176720429ac21d11682a0b75b4b7DRC  boolean perfect;              /* if TRUE, fail if partial MCUs are requested */
121b775351012af176720429ac21d11682a0b75b4b7DRC  boolean trim;                 /* if TRUE, trim partial MCUs as needed */
122b775351012af176720429ac21d11682a0b75b4b7DRC  boolean force_grayscale;      /* if TRUE, convert color image to grayscale */
123b775351012af176720429ac21d11682a0b75b4b7DRC  boolean crop;                 /* if TRUE, crop source image */
124ba5ea5143e48b71234414139e3b4cb244599e875DRC  boolean slow_hflip;  /* For best performance, the JXFORM_FLIP_H transform
125ba5ea5143e48b71234414139e3b4cb244599e875DRC                          normally modifies the source coefficients in place.
126ba5ea5143e48b71234414139e3b4cb244599e875DRC                          Setting this to TRUE will instead use a slower,
127ba5ea5143e48b71234414139e3b4cb244599e875DRC                          double-buffered algorithm, which leaves the source
128ba5ea5143e48b71234414139e3b4cb244599e875DRC                          coefficients in tact (necessary if other transformed
129ba5ea5143e48b71234414139e3b4cb244599e875DRC                          images must be generated from the same set of
130ba5ea5143e48b71234414139e3b4cb244599e875DRC                          coefficients. */
1315996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
1325996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding  /* Crop parameters: application need not set these unless crop is TRUE.
1335996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding   * These can be filled in by jtransform_parse_crop_spec().
1345996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding   */
135b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION crop_width;        /* Width of selected region */
136b775351012af176720429ac21d11682a0b75b4b7DRC  JCROP_CODE crop_width_set;    /* (forced disables adjustment) */
137b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION crop_height;       /* Height of selected region */
138b775351012af176720429ac21d11682a0b75b4b7DRC  JCROP_CODE crop_height_set;   /* (forced disables adjustment) */
139b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION crop_xoffset;      /* X offset of selected region */
140b775351012af176720429ac21d11682a0b75b4b7DRC  JCROP_CODE crop_xoffset_set;  /* (negative measures from right edge) */
141b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION crop_yoffset;      /* Y offset of selected region */
142b775351012af176720429ac21d11682a0b75b4b7DRC  JCROP_CODE crop_yoffset_set;  /* (negative measures from bottom edge) */
1435ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1445ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane  /* Internal workspace: caller should not touch these */
145b775351012af176720429ac21d11682a0b75b4b7DRC  int num_components;           /* # of components in workspace */
1466eb7d3798b5a79347c62825fc4c16f7ce673bdd0Alex Naidis  jvirt_barray_ptr *workspace_coef_arrays; /* workspace for transformations */
147b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION output_width;      /* cropped destination dimensions */
1485996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding  JDIMENSION output_height;
149b775351012af176720429ac21d11682a0b75b4b7DRC  JDIMENSION x_crop_offset;     /* destination crop offsets measured in iMCUs */
1505996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding  JDIMENSION y_crop_offset;
151b775351012af176720429ac21d11682a0b75b4b7DRC  int iMCU_sample_width;        /* destination iMCU size */
152989630f70cf1af69ebfefca8910d1647bf189712Guido Vollbeding  int iMCU_sample_height;
1535ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane} jpeg_transform_info;
1545ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1555ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1565ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane#if TRANSFORMS_SUPPORTED
1575ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1585996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/* Parse a crop specification (written in X11 geometry style) */
1595996a25e2f50d20d6a8f09830724035b49c3927bGuido VollbedingEXTERN(boolean) jtransform_parse_crop_spec
160bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (jpeg_transform_info *info, const char *spec);
1615ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* Request any required workspace */
162989630f70cf1af69ebfefca8910d1647bf189712Guido VollbedingEXTERN(boolean) jtransform_request_workspace
163bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (j_decompress_ptr srcinfo, jpeg_transform_info *info);
1645ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* Adjust output image parameters */
1655ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. LaneEXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
166bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
167bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC         jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info);
1685ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* Execute the actual transformation, if any */
1695996a25e2f50d20d6a8f09830724035b49c3927bGuido VollbedingEXTERN(void) jtransform_execute_transform
170bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
171bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC         jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info);
1725996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/* Determine whether lossless transformation is perfectly
1735996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * possible for a specified image and transformation.
1745996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding */
1755996a25e2f50d20d6a8f09830724035b49c3927bGuido VollbedingEXTERN(boolean) jtransform_perfect_transform
176bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (JDIMENSION image_width, JDIMENSION image_height, int MCU_width,
177bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC         int MCU_height, JXFORM_CODE transform);
1785996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding
1795996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding/* jtransform_execute_transform used to be called
1805996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * jtransform_execute_transformation, but some compilers complain about
1815996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * routine names that long.  This macro is here to avoid breaking any
1825996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding * old source code that uses the original name...
1835996a25e2f50d20d6a8f09830724035b49c3927bGuido Vollbeding */
184b775351012af176720429ac21d11682a0b75b4b7DRC#define jtransform_execute_transformation       jtransform_execute_transform
1855ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1865ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane#endif /* TRANSFORMS_SUPPORTED */
1875ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1885ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1895ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/*
1905ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * Support for copying optional markers from source to destination file.
1915ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane */
1925ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
1935ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lanetypedef enum {
194333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCOPYOPT_NONE,          /* copy no optional markers */
195333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCOPYOPT_COMMENTS,      /* copy only comment (COM) markers */
196333e9187c8a6f69833baaee51ccd802b0e093cc1DRC  JCOPYOPT_ALL            /* copy all optional markers */
1975ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane} JCOPY_OPTION;
1985ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
199b775351012af176720429ac21d11682a0b75b4b7DRC#define JCOPYOPT_DEFAULT  JCOPYOPT_COMMENTS     /* recommended default */
2005ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane
2015ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* Setup decompression object to save desired markers in memory */
2025ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. LaneEXTERN(void) jcopy_markers_setup
203bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (j_decompress_ptr srcinfo, JCOPY_OPTION option);
2045ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane/* Copy markers saved in the given source object to the destination object */
2055ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. LaneEXTERN(void) jcopy_markers_execute
206bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC        (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
207bc56b754e1a6a1db9ccadf64d6dda8a74140e1a3DRC         JCOPY_OPTION option);
208