...
 
Commits (22)
2006-12-10 Paolo Bacchilega <paobac@cvs.gnome.org>
* components/catalog-view/Makefile.am
* components/image-viewer/Makefile.am
* configure.in
* libgthumb/Makefile.am
* src/Makefile.am
* src/jpegutils/transupp.c
Fixed bug #317056 – gthumb Cygwin build fixes
2006-12-07 Paolo Bacchilega <paobac@cvs.gnome.org>
* NEWS: updated for 2.8.1
* configure.in: changed version to 2.8.1
* src/dir-list.c (dir_list_change_to__step2, dir_list_change_to):
interrupt the path list operation before starting a new one.
2006-11-27 Paolo Bacchilega <paobac@cvs.gnome.org>
* libgthumb/gth-image-list.c (gth_image_list_expose): use allocation
size instead of gdk_drawable_get_size function.
2006-11-26 Paolo Bacchilega <paobac@cvs.gnome.org>
* libgthumb/gth-image-list.c (gth_image_list_clear): freeze the ui
while clearing the image list.
2006-11-25 Michael J. Chudobiak <mjc@cvs.gnome.org>
* src/rotation-utils.c: (reset_orientation_field),
(update_orientation_field):
Moved reset_orientation_field to fix compile error.
2006-11-24 Paolo Bacchilega <paobac@cvs.gnome.org>
[ gthumb 2.8.0 released ]
* NEWS:
* configure.in: updated for 2.8.0
2006-11-19 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-location.c:
Fixed bug #356623 – gThumb crashed when I inserted a blank CD-R disk
Patch by manuel
2006-11-05 Michael J. Chudobiak <mjc@cvs.gnome.org>
* NEWS:
* libgthumb/async-pixbuf-ops.c: (scale_step):
Fixes image scaling memory leak (bug #349576)
2006-10-14 Paolo Bacchilega <paobac@cvs.gnome.org>
* libgthumb/print-callbacks.c:
fixed printing of multiline comments.
2006-10-13 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/rotation-utils.c (reset_orientation_field)
(apply_transformation_jpeg):
always reset the exif orientation field after a rotation.
2006-10-01 Paolo Bacchilega <paobac@cvs.gnome.org>
[ gthumb 2.7.9 released ]
......
version 2.8.1
-------------
* Fixed compilation warning.
* Fixed minor image list issues.
version 2.8.0
-------------
* Always reset the exif orientation field after a rotation.
* Fixed image scaling memory leak (bug #349576)
* Fixed bug #356623 – gThumb crashed when I inserted a blank CD-R disk
* Fixed printing of multiline comments.
version 2.7.9
-------------
* Fixed bug #351058: build failure when -Wl,--as-needed is passed to
......
......@@ -28,12 +28,12 @@ gthumb_catalog_view_SOURCES = \
catalog-nautilus-view.h
gthumb_catalog_view_LDADD = \
$(top_builddir)/libgthumb/libgthumb.la \
$(COMPONENT_LIBS) \
$(JPEG_LIBS) \
$(IPTCDATA_LIBS) \
$(TIFF_LIBS) \
$(RENDER_LIBS) \
$(top_builddir)/libgthumb/libgthumb.la
$(RENDER_LIBS)
$(nautilus_view_component_idl_sources): nautilus_view_component_idl_stamp
nautilus_view_component_idl_stamp: nautilus-view-component.idl $(ORBIT_IDL)
......
......@@ -33,12 +33,12 @@ gthumb_image_viewer_SOURCES = \
viewer-stream.h
gthumb_image_viewer_LDADD = \
$(top_builddir)/libgthumb/libgthumb.la \
$(COMPONENT_LIBS) \
$(JPEG_LIBS) \
$(IPTCDATA_LIBS) \
$(TIFF_LIBS) \
$(RENDER_LIBS) \
$(top_builddir)/libgthumb/libgthumb.la
$(RENDER_LIBS)
$(nautilus_view_component_idl_sources): nautilus_view_component_idl_stamp
nautilus_view_component_idl_stamp: nautilus-view-component.idl $(ORBIT_IDL)
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(gthumb, 2.7.9, http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb)
AC_INIT(gthumb, 2.8.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb)
AC_CONFIG_SRCDIR(src/main.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
......@@ -290,7 +290,7 @@ dnl ###############################################
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
ALL_LINGUAS="am az be bg ca cs da de dz el en_CA en_GB es et eu fi fr ga gl gu hi hr hu id it ja ko lt lv mk ml ms nb ne nl nn pa pl pt pt_BR ru rw sk sq sr sr@Latn sv th tr uk vi xh zh_CN zh_HK zh_TW"
ALL_LINGUAS="am ar az be bg ca cs da de dz el en_CA en_GB es et eu fi fr ga gl gu hi hr hu id it ja ko lt lv mk ml ms nb ne nl nn pa pl pt pt_BR ru rw sk sq sr sr@Latn sv th tr uk vi xh zh_CN zh_HK zh_TW"
GETTEXT_PACKAGE=gthumb
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GetText Package])
......@@ -321,7 +321,37 @@ AM_GCONF_SOURCE_2
dnl ******************************
MODULE_LIBTOOL_FLAGS="-module -avoid-version"
AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
*-*-cygwin*|*-*-mingw*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
AC_MSG_CHECKING([for native Win32])
case "$host" in
*-*-mingw*)
os_win32=yes
;;
*)
os_win32=no
;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
dnl ******************************
if test "$platform_win32" = "yes" ; then
MODULE_LIBTOOL_FLAGS='-module -avoid-version -no-undefined -Wl,$(top_builddir)/src/.libs/gthumb.exe.a'
else
MODULE_LIBTOOL_FLAGS='-module -avoid-version'
fi
AC_SUBST(MODULE_LIBTOOL_FLAGS)
AC_OUTPUT([
......
......@@ -15,9 +15,9 @@ INCLUDES = \
-DGTHUMB_GLADEDIR=\""$(gladedir)"\" \
$(DISABLE_DEPRECATED)
libgthumbdir = $(libdir)/gthumb
libgthumbdir = $(libdir)
libgthumb_LTLIBRARIES = libgthumb.la
libgthumb_la_LDFLAGS = -avoid-version
libgthumb_la_LDFLAGS = -avoid-version -no-undefined
EEL_CANVAS_RECT = \
eel-canvas-rect.c \
......@@ -129,6 +129,7 @@ libgthumb_la_SOURCES = \
thumb-loader.c
libgthumb_la_LIBADD = \
$(JPEG_LIBS) \
$(TIFF_LIBS) \
$(GTHUMB_LIBS) \
$(IPTCDATA_LIBS)
......
......@@ -1599,8 +1599,11 @@ scale_step (GthPixbufOp *pixop)
new_h = data->height;
}
if ((new_w > 1) && (new_h > 1))
if ((new_w > 1) && (new_h > 1)) {
if(pixop->dest != NULL)
g_object_unref(pixop->dest);
pixop->dest = gdk_pixbuf_scale_simple (pixop->src, new_w, new_h, GDK_INTERP_BILINEAR);
}
}
......
......@@ -1724,7 +1724,8 @@ gth_image_list_expose (GtkWidget *widget,
if (no_image_msg == NULL)
return TRUE;
gdk_drawable_get_size (priv->bin_window, &w, &h);
w = widget->allocation.width;
h = widget->allocation.height;
pango_layout_set_width (layout, w * PANGO_SCALE);
pango_layout_set_text (layout, no_image_msg, strlen (no_image_msg));
......@@ -3816,6 +3817,8 @@ gth_image_list_clear (GthImageList *image_list)
g_return_if_fail (image_list != NULL);
gth_image_list_freeze (image_list);
if (priv->image_list != NULL) {
GList *scan;
......@@ -3839,8 +3842,7 @@ gth_image_list_clear (GthImageList *image_list)
gtk_adjustment_set_value (priv->hadjustment, 0);
gtk_adjustment_set_value (priv->vadjustment, 0);
layout_all_images (image_list);
keep_focus_consistent (image_list);
gth_image_list_thaw (image_list);
}
......
......@@ -400,13 +400,14 @@ pci_get_next_line_to_print_delimiter (PrintCatalogInfo *pci,
const char *p;
double current_width = 0.0;
ArtPoint space_advance;
int space, new_line;
int space, new_line1, new_line2;
/* Find space advance */
space = gnome_font_lookup_default (pci->font_comment, ' ');
gnome_font_get_glyph_stdadvance (pci->font_comment, space, &space_advance);
new_line = gnome_font_lookup_default (pci->font_comment, '\n');
new_line1 = gnome_font_lookup_default (pci->font_comment, '\n');
new_line2 = gnome_font_lookup_default (pci->font_comment, PARAGRAPH_SEPARATOR);
for (p = start; p < end; p = g_utf8_next_char (p)) {
gunichar ch;
......@@ -415,7 +416,7 @@ pci_get_next_line_to_print_delimiter (PrintCatalogInfo *pci,
ch = g_utf8_get_char (p);
glyph = gnome_font_lookup_default (pci->font_comment, ch);
if (glyph == new_line) {
if (glyph == new_line1 || glyph == new_line2) {
if (line_width != NULL)
*line_width = max_width;
return p;
......@@ -489,6 +490,8 @@ pci_print_paragraph (GnomePrintContext *pc,
for (p = start; p < end; ) {
s = p;
p = pci_get_next_line_to_print_delimiter (pci, max_width, s, end, NULL);
if (p == s)
return y;
pci_print_line (pc, pci, s, p, x, y);
y -= 1.2 * gnome_font_get_size (pci->font_comment);
}
......@@ -521,9 +524,7 @@ pci_get_text_extents (PrintCatalogInfo *pci,
for (p = start; p < text_end;) {
gunichar wc = g_utf8_get_char (p);
if ((wc == '\n' ||
wc == '\r' ||
wc == PARAGRAPH_SEPARATOR))
if (wc == '\n' || wc == PARAGRAPH_SEPARATOR)
*height += 1.2 * gnome_font_get_size (pci->font_comment);
else {
const char *p1, *s1;
......@@ -533,12 +534,20 @@ pci_get_text_extents (PrintCatalogInfo *pci,
s1 = p1;
p1 = pci_get_next_line_to_print_delimiter (pci, max_width, s1, end, &line_width);
if (p1 == s1) {
*width = 0.0;
*height = 0.0;
return;
}
*width = MAX (*width, line_width);
*height += 1.2 * gnome_font_get_size (pci->font_comment);
}
}
p = p + next_paragraph_start;
if (next_paragraph_start == 0)
break;
if (p < text_end) {
pango_find_paragraph_boundary (p, -1, &paragraph_delimiter_index, &next_paragraph_start);
......@@ -548,7 +557,7 @@ pci_get_text_extents (PrintCatalogInfo *pci,
}
static double
static void
pci_print_comment (GnomePrintContext *pc,
PrintCatalogInfo *pci,
ImageInfo *image)
......@@ -563,10 +572,10 @@ pci_print_comment (GnomePrintContext *pc,
char *text_end;
if (image->comment == NULL)
return 0.0;
return;
if (!image->print_comment)
return 0.0;
return;
gnome_print_setfont (pc, pci->font_comment);
......@@ -590,39 +599,10 @@ pci_print_comment (GnomePrintContext *pc,
while (p < text_end) {
gunichar wc = g_utf8_get_char (p);
if ((wc == '\n' ||
wc == '\r' ||
wc == PARAGRAPH_SEPARATOR)) {
if (wc == '\n' || wc == PARAGRAPH_SEPARATOR)
y -= 1.2 * gnome_font_get_size (pci->font_comment);
if (y - image->max_y < fontheight) {
/* FIXME
gnome_print_showpage (pc);
gnome_print_beginpage (pc, NULL);
x = pi->paper_lmargin + MAX (0, (printable_width - width) / 2);
y = pi->paper_bmargin + height;
*/
/* text do not fit. */
return image->max_y + height;
}
} else {
else
y = pci_print_paragraph (pc, pci, p, end, printable_width, x, y);
if ((y - image->max_y) < fontheight) {
/* FIXME
gnome_print_showpage (pc);
gnome_print_beginpage (pc, NULL);
x = pi->paper_lmargin + MAX (0, (printable_width - width) / 2);
y = pi->paper_bmargin + height;
*/
/* text do not fit. */
return image->max_y + height;
}
}
p = p + next_paragraph_start;
......@@ -631,8 +611,6 @@ pci_print_comment (GnomePrintContext *pc,
end = p + paragraph_delimiter_index;
}
}
return image->max_y + height;
}
......@@ -1253,8 +1231,6 @@ catalog_update_custom_page_size (PrintCatalogDialogData *data)
height = gtk_spin_button_get_value (GTK_SPIN_BUTTON (data->height_spinbutton));
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_HEIGHT, height, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_HEIGHT, height, unit);
catalog_update_page (data);
}
......@@ -1386,8 +1362,6 @@ catalog_set_standard_page_size (PrintCatalogDialogData *data,
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_HEIGHT, height, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_HEIGHT, height, unit);
catalog_update_page_size_from_config (data);
catalog_update_page (data);
......
2007-04-21 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Djihed Afifi.
2007-03-01 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation by Christophe Bliard.
2007-02-15 Leonardo Ferreira Fontenelle <leonardof@svn.gnome.org>
* pt_BR.po: Minor fixes in Brazilian Portuguese translation.
2007-01-18 Raphael Higino <raphaelh@svn.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation.
2007-01-13 Raphael Higino <raphaelh@svn.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation.
2006-12-17 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated.
2006-12-10 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Fixed a translation error.
2006-11-21 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Portuguese translation updated by Luis Matos <gass@otiliamatos.ath.cx>
2006-11-18 Djihed Afifi <djihed@gmail.com>
* ar.po: Added Arabic Translation.
* LINGUAS: Added ar.
2006-10-26 Clytie Siddall <clytie@riverland.net.au>
* vi.po: Updated Vietnamese translation.
2006-10-26 Clytie Siddall <clytie@riverland.net.au>
* vi.po: Updated Vietnamese translation.
2006-10-22 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation from
Christophe Bliard <christophe.bliard@trux.info>.
2006-09-24 Pawan Chitrakar <pchitrakar@gmail.com>
* ne.po: Updated Nepali Translation
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -137,7 +137,13 @@ gthumb_SOURCES = \
rotation-utils.c \
rotation-utils.h
if PLATFORM_WIN32
gthumb_LDFLAGS = -Wl,--export-all-symbols,--out-implib,.libs/gthumb.exe.a
endif
gthumb_LDADD = \
$(top_builddir)/src/jpegutils/libgthumb-jpegutils.la \
$(top_builddir)/libgthumb/libgthumb.la \
$(EXIF_LIBS) \
$(IPTCDATA_LIBS) \
$(GTHUMB_LIBS) \
......@@ -146,9 +152,7 @@ gthumb_LDADD = \
$(RENDER_LIBS) \
$(GPHOTO_LIBS) \
$(XF86GAMMA_LIBS) \
$(XTEST_LIBS) \
$(top_builddir)/libgthumb/libgthumb.la \
$(top_builddir)/src/jpegutils/libgthumb-jpegutils.la
$(XTEST_LIBS)
moduledir = $(libdir)/gthumb/modules
module_LTLIBRARIES = \
......@@ -161,10 +165,13 @@ module_LTLIBRARIES = \
libduplicates_la_SOURCES = dlg-duplicates.c dlg-duplicates.h
libduplicates_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libduplicates_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS) $(GTHUMB_LIBS)
libduplicates_la_DEPENDENCIES = gthumb$(EXEEXT)
libjpegtran_la_SOURCES = dlg-jpegtran.c dlg-jpegtran.h
libjpegtran_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libjpegtran_la_LIBADD = $(top_builddir)/src/jpegutils/libgthumb-jpegutils.la
libjpegtran_la_LIBADD = $(top_builddir)/src/jpegutils/libgthumb-jpegutils.la $(top_builddir)/libgthumb/libgthumb.la $(EXIF_LIBS) $(JPEG_LIBS) $(GTHUMB_LIBS)
libjpegtran_la_DEPENDENCIES = gthumb$(EXEEXT)
libpngexporter_la_SOURCES = \
catalog-png-exporter.c \
......@@ -172,9 +179,13 @@ libpngexporter_la_SOURCES = \
dlg-png-exporter.c \
dlg-png-exporter.h
libpngexporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libpngexporter_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS) $(PNG_LIBS)
libpngexporter_la_DEPENDENCIES = gthumb$(EXEEXT)
libsearch_la_SOURCES = dlg-search.c dlg-search.h
libsearch_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libsearch_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(JPEG_LIBS) $(TIFF_LIBS) $(PNG_LIBS) $(GTHUMB_LIBS)
libsearch_la_DEPENDENCIES = gthumb$(EXEEXT)
libwebexporter_la_SOURCES = \
albumtheme.c \
......@@ -185,10 +196,14 @@ libwebexporter_la_SOURCES = \
dlg-web-exporter.c \
dlg-web-exporter.h
libwebexporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libwebexporter_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS) $(EXIF_LIBS)
libwebexporter_la_DEPENDENCIES = gthumb$(EXEEXT)
libphotoimporter_la_SOURCES = dlg-photo-importer.c dlg-photo-importer.h
libphotoimporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
libphotoimporter_la_LIBADD = $(top_builddir)/src/jpegutils/libgthumb-jpegutils.la
libphotoimporter_la_LIBADD = $(top_builddir)/src/jpegutils/libgthumb-jpegutils.la $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS) $(EXIF_LIBS) $(JPEG_LIBS) $(GPHOTO_LIBS)
libphotoimporter_la_DEPENDENCIES = gthumb$(EXEEXT)
EXTRA_DIST = \
GNOME_GThumb.idl \
......
......@@ -390,7 +390,7 @@ dir_list_update_icon_theme (DirList *dir_list)
static void
dir_list_refresh_continue (PathListData *pld,
dir_list_change_to__step3 (PathListData *pld,
gpointer data)
{
DirList *dir_list = data;
......@@ -530,6 +530,14 @@ dir_list_refresh_continue (PathListData *pld,
}
static void
dir_list_change_to__step2 (gpointer callback_data)
{
DirList *dir_list = callback_data;
dir_list->dir_load_handle = path_list_async_new (dir_list->try_path, dir_list_change_to__step3, dir_list);
}
void
dir_list_change_to (DirList *dir_list,
const gchar *path,
......@@ -546,9 +554,9 @@ dir_list_change_to (DirList *dir_list,
dir_list->try_path = g_strdup (path);
if (dir_list->dir_load_handle != NULL)
path_list_handle_free (dir_list->dir_load_handle);
dir_list->dir_load_handle = path_list_async_new (dir_list->try_path, dir_list_refresh_continue, dir_list);
path_list_async_interrupt (dir_list->dir_load_handle, dir_list_change_to__step2, dir_list);
else
dir_list->dir_load_handle = path_list_async_new (dir_list->try_path, dir_list_change_to__step3, dir_list);
}
......
......@@ -82,6 +82,21 @@ static GtkHBoxClass *parent_class = NULL;
static guint gth_location_signals[LAST_SIGNAL] = { 0 };
static void update_drives (GthLocation *loc);
static void
monitor_changed_cb (GnomeVFSVolumeMonitor *volume_monitor,
gpointer data,
GthLocation *loc)
{
g_list_foreach (loc->priv->drives, (GFunc) gnome_vfs_drive_unref, NULL);
g_list_free (loc->priv->drives);
loc->priv->drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);
update_drives (loc);
}
static void
gth_location_finalize (GObject *object)
{
......@@ -97,6 +112,10 @@ gth_location_finalize (GObject *object)
g_list_free (loc->priv->drives);
loc->priv->drives = NULL;
g_signal_handlers_disconnect_by_func (loc->priv->volume_monitor,
G_CALLBACK (monitor_changed_cb),
loc);
g_free (loc->priv);
loc->priv = NULL;
}
......@@ -138,21 +157,6 @@ gth_location_class_init (GthLocationClass *class)
}
static void update_drives (GthLocation *loc);
static void
monitor_changed_cb (GnomeVFSVolumeMonitor *volume_monitor,
gpointer data,
GthLocation *loc)
{
g_list_foreach (loc->priv->drives, (GFunc) gnome_vfs_drive_unref, NULL);
g_list_free (loc->priv->drives);
loc->priv->drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);
update_drives (loc);
}
static void
gth_location_init (GthLocation *loc)
{
......
......@@ -51,6 +51,11 @@
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifdef __CYGWIN__
#define height_in_blocks height_in_data_units
#define width_in_blocks width_in_data_units
#endif
enum {
JERR_CONVERSION_NOTIMPL
};
......
......@@ -108,6 +108,51 @@ update_rotation_from_exif_data (const char *path,
}
void
reset_orientation_field (const char *path)
{
JPEGData *jdata;
ExifData *edata;
unsigned int i;
path = get_file_path_from_uri (path);
if (path == NULL)
return;
jdata = jpeg_data_new_from_file (path);
if (jdata == NULL)
return;
edata = jpeg_data_get_exif_data (jdata);
if (edata == NULL) {
jpeg_data_unref (jdata);
return;
}
for (i = 0; i < EXIF_IFD_COUNT; i++) {
ExifContent *content = edata->ifd[i];
ExifEntry *entry;
if ((content == NULL) || (content->count == 0))
continue;
entry = exif_content_get_entry (content, EXIF_TAG_ORIENTATION);
if (entry != NULL) {
ExifByteOrder byte_order;
ExifShort value;
byte_order = exif_data_get_byte_order (edata);
exif_set_short (entry->data, byte_order, 1);
}
}
jpeg_data_save_file (jdata, path);
exif_data_unref (edata);
jpeg_data_unref (jdata);
}
void
apply_transformation_jpeg (GtkWindow *win,
const char *path,
......@@ -271,7 +316,7 @@ apply_transformation_jpeg (GtkWindow *win,
#ifdef HAVE_LIBEXIF
if ((rot_type == GTH_TRANSFORM_ROTATE_90) || (rot_type == GTH_TRANSFORM_ROTATE_270))
swap_xy_exif_fields (path);
/* update_orientation_field (path, rot_data); see bug #318828 */
reset_orientation_field (path);
#endif
}
......