2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2005-01-07 07:21:43 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2005-01-07 07:21:43 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2005-01-07 07:21:43 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-01-07 07:21:43 +08:00
|
|
|
*/
|
2005-01-04 05:36:43 +08:00
|
|
|
|
2005-08-12 23:46:46 +08:00
|
|
|
#define LOAD_PROC "file-jpeg-load"
|
|
|
|
#define LOAD_THUMB_PROC "file-jpeg-load-thumb"
|
|
|
|
#define SAVE_PROC "file-jpeg-save"
|
2009-03-11 07:13:55 +08:00
|
|
|
#define PLUG_IN_BINARY "file-jpeg"
|
2011-04-09 02:31:34 +08:00
|
|
|
#define PLUG_IN_ROLE "gimp-file-jpeg"
|
2005-08-12 23:46:46 +08:00
|
|
|
|
2005-04-12 15:46:10 +08:00
|
|
|
/* headers used in some APPn markers */
|
2007-07-18 04:06:09 +08:00
|
|
|
#define JPEG_APP_HEADER_EXIF "Exif\0\0"
|
2005-04-12 15:46:10 +08:00
|
|
|
#define JPEG_APP_HEADER_XMP "http://ns.adobe.com/xap/1.0/"
|
|
|
|
|
2005-01-04 05:36:43 +08:00
|
|
|
typedef struct my_error_mgr
|
|
|
|
{
|
|
|
|
struct jpeg_error_mgr pub; /* "public" fields */
|
|
|
|
|
|
|
|
#ifdef __ia64__
|
|
|
|
/* Ugh, the jmp_buf field needs to be 16-byte aligned on ia64 and some
|
|
|
|
* glibc/icc combinations don't guarantee this. So we pad. See bug #138357
|
|
|
|
* for details.
|
|
|
|
*/
|
|
|
|
long double dummy;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
jmp_buf setjmp_buffer; /* for return to caller */
|
|
|
|
} *my_error_ptr;
|
|
|
|
|
2008-09-25 22:30:02 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
2011-06-11 02:10:23 +08:00
|
|
|
JPEG_SUBSAMPLING_2x2_1x1_1x1 = 0, /* smallest file */
|
|
|
|
JPEG_SUBSAMPLING_2x1_1x1_1x1 = 1, /* 4:2:2 */
|
|
|
|
JPEG_SUBSAMPLING_1x1_1x1_1x1 = 2,
|
|
|
|
JPEG_SUBSAMPLING_1x2_1x1_1x1 = 3
|
2008-09-25 22:30:02 +08:00
|
|
|
} JpegSubsampling;
|
2005-01-04 05:36:43 +08:00
|
|
|
|
2007-08-08 18:31:38 +08:00
|
|
|
extern gint32 volatile preview_image_ID;
|
|
|
|
extern gint32 preview_layer_ID;
|
2006-05-25 04:16:25 +08:00
|
|
|
extern GimpDrawable *drawable_global;
|
|
|
|
extern gboolean undo_touched;
|
|
|
|
extern gboolean load_interactive;
|
|
|
|
extern gint32 display_ID;
|
|
|
|
extern gchar *image_comment;
|
2007-07-27 07:44:51 +08:00
|
|
|
extern gboolean has_metadata;
|
2007-08-11 05:45:38 +08:00
|
|
|
extern gint orig_quality;
|
2008-09-25 22:30:02 +08:00
|
|
|
extern JpegSubsampling orig_subsmp;
|
2007-08-11 05:45:38 +08:00
|
|
|
extern gint num_quant_tables;
|
2005-01-04 05:36:43 +08:00
|
|
|
|
|
|
|
|
2005-01-07 07:21:43 +08:00
|
|
|
void destroy_preview (void);
|
2005-01-04 05:36:43 +08:00
|
|
|
|
2005-01-07 07:21:43 +08:00
|
|
|
void my_error_exit (j_common_ptr cinfo);
|
|
|
|
void my_emit_message (j_common_ptr cinfo,
|
|
|
|
int msg_level);
|
|
|
|
void my_output_message (j_common_ptr cinfo);
|