[gimp/metadata-browser] file-jpeg: Create jpeg-exif.h and move EXIF protos to it



commit 3aaad17da5bc4816f3d7eeed42615f223c54e453
Author: Mukund Sivaraman <muks banu com>
Date:   Sun Sep 18 07:21:30 2011 +0530

    file-jpeg: Create jpeg-exif.h and move EXIF protos to it

 plug-ins/file-jpeg/Makefile.am |    1 +
 plug-ins/file-jpeg/jpeg-exif.c |    2 +-
 plug-ins/file-jpeg/jpeg-exif.h |   40 ++++++++++++++++++++++++++++++++++++++++
 plug-ins/file-jpeg/jpeg-load.c |    3 +++
 plug-ins/file-jpeg/jpeg-save.c |    3 +++
 plug-ins/file-jpeg/jpeg.c      |    3 +++
 plug-ins/file-jpeg/jpeg.h      |   25 -------------------------
 7 files changed, 51 insertions(+), 26 deletions(-)
---
diff --git a/plug-ins/file-jpeg/Makefile.am b/plug-ins/file-jpeg/Makefile.am
index 7c8769c..4e266bf 100644
--- a/plug-ins/file-jpeg/Makefile.am
+++ b/plug-ins/file-jpeg/Makefile.am
@@ -34,6 +34,7 @@ file_jpeg_SOURCES = \
 	jpeg.c		\
 	jpeg.h		\
 	jpeg-exif.c	\
+	jpeg-exif.h	\
 	jpeg-icc.c	\
 	jpeg-icc.h	\
 	jpeg-load.c	\
diff --git a/plug-ins/file-jpeg/jpeg-exif.c b/plug-ins/file-jpeg/jpeg-exif.c
index 57e4f61..37ae8a8 100644
--- a/plug-ins/file-jpeg/jpeg-exif.c
+++ b/plug-ins/file-jpeg/jpeg-exif.c
@@ -41,8 +41,8 @@
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
 
+#include "jpeg-exif.h"
 #include "gimpexif.h"
-
 #include "jpeg.h"
 #include "jpeg-settings.h"
 
diff --git a/plug-ins/file-jpeg/jpeg-exif.h b/plug-ins/file-jpeg/jpeg-exif.h
new file mode 100644
index 0000000..725dfa9
--- /dev/null
+++ b/plug-ins/file-jpeg/jpeg-exif.h
@@ -0,0 +1,40 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (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
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_LIBEXIF
+
+extern ExifData *exif_data;
+
+ExifData * jpeg_exif_data_new_from_file (const gchar   *filename,
+                                         GError       **error);
+
+gint      jpeg_exif_get_orientation     (ExifData      *exif_data);
+
+gboolean  jpeg_exif_get_resolution      (ExifData       *exif_data,
+                                         gdouble        *xresolution,
+                                         gdouble        *yresolution,
+                                         gint           *unit);
+
+void      jpeg_setup_exif_for_save      (ExifData      *exif_data,
+                                         const gint32   image_ID);
+
+void      jpeg_exif_rotate              (gint32         image_ID,
+                                         gint           orientation);
+void      jpeg_exif_rotate_query        (gint32         image_ID,
+                                         gint           orientation);
+
+#endif /* HAVE_LIBEXIF */
diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c
index c32d484..a77b343 100644
--- a/plug-ins/file-jpeg/jpeg-load.c
+++ b/plug-ins/file-jpeg/jpeg-load.c
@@ -45,6 +45,9 @@
 #include "jpeg-icc.h"
 #include "jpeg-settings.h"
 #include "jpeg-load.h"
+#ifdef HAVE_LIBEXIF
+#include "jpeg-exif.h"
+#endif
 
 
 static void  jpeg_load_resolution           (gint32    image_ID,
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index 3056497..9ea465c 100644
--- a/plug-ins/file-jpeg/jpeg-save.c
+++ b/plug-ins/file-jpeg/jpeg-save.c
@@ -47,6 +47,9 @@
 #include "jpeg-load.h"
 #include "jpeg-save.h"
 #include "jpeg-settings.h"
+#ifdef HAVE_LIBEXIF
+#include "jpeg-exif.h"
+#endif
 
 
 #define SCALE_WIDTH         125
diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c
index 9a573dd..398dcdc 100644
--- a/plug-ins/file-jpeg/jpeg.c
+++ b/plug-ins/file-jpeg/jpeg.c
@@ -37,6 +37,9 @@
 #include "jpeg-settings.h"
 #include "jpeg-load.h"
 #include "jpeg-save.h"
+#ifdef HAVE_LIBEXIF
+#include "jpeg-exif.h"
+#endif
 #include "gimpexif.h"
 
 
diff --git a/plug-ins/file-jpeg/jpeg.h b/plug-ins/file-jpeg/jpeg.h
index 3158b13..ae67b66 100644
--- a/plug-ins/file-jpeg/jpeg.h
+++ b/plug-ins/file-jpeg/jpeg.h
@@ -67,28 +67,3 @@ 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);
-
-#ifdef HAVE_LIBEXIF
-
-extern ExifData *exif_data;
-
-ExifData * jpeg_exif_data_new_from_file (const gchar   *filename,
-                                         GError       **error);
-
-gint      jpeg_exif_get_orientation     (ExifData      *exif_data);
-
-gboolean  jpeg_exif_get_resolution      (ExifData       *exif_data,
-                                         gdouble        *xresolution,
-                                         gdouble        *yresolution,
-                                         gint           *unit);
-
-void      jpeg_setup_exif_for_save      (ExifData      *exif_data,
-                                         const gint32   image_ID);
-
-void      jpeg_exif_rotate              (gint32         image_ID,
-                                         gint           orientation);
-void      jpeg_exif_rotate_query        (gint32         image_ID,
-                                         gint           orientation);
-
-#endif /* HAVE_LIBEXIF */
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]