gthumb r2271 - in trunk: . libgthumb
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2271 - in trunk: . libgthumb
- Date: Thu, 7 Feb 2008 18:59:48 +0000 (GMT)
Author: mjc
Date: Thu Feb 7 18:59:48 2008
New Revision: 2271
URL: http://svn.gnome.org/viewvc/gthumb?rev=2271&view=rev
Log:
2008-02-07 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/gth-exiv2-utils.cpp:
Always overwrite the software tag upon file save.
Modified:
trunk/ChangeLog
trunk/libgthumb/gth-exiv2-utils.cpp
Modified: trunk/libgthumb/gth-exiv2-utils.cpp
==============================================================================
--- trunk/libgthumb/gth-exiv2-utils.cpp (original)
+++ trunk/libgthumb/gth-exiv2-utils.cpp Thu Feb 7 18:59:48 2008
@@ -619,7 +619,7 @@
// anyways.
image1->exifData().eraseThumbnail();
- // Mandatory tags
+ // Mandatory tags - add if not already present
mandatory_int (ed, "Exif.Image.XResolution", 72);
mandatory_int (ed, "Exif.Image.YResolution", 72);
mandatory_int (ed, "Exif.Image.ResolutionUnit", 2);
@@ -628,8 +628,11 @@
mandatory_string (ed, "Exif.Photo.ExifVersion", "48 50 50 49");
mandatory_string (ed, "Exif.Photo.ComponentsConfiguration", "1 2 3 0");
mandatory_string (ed, "Exif.Photo.FlashpixVersion", "48 49 48 48");
- mandatory_string (ed, "Exif.Image.Software", "gThumb " VERSION);
+ // Overwrite the software string
+ ed["Exif.Image.Software"] = "gThumb " VERSION;
+
+ // Update the dimension tags with actual image values
int width = 0;
int height = 0;
gdk_pixbuf_get_file_info (to_file, &width, &height);
@@ -640,9 +643,9 @@
if (height > 0)
ed["Exif.Photo.PixelYDimension"] = height;
+ // Update the DateTime tag
time_t curtime = 0;
struct tm tm;
-
time (&curtime);
localtime_r (&curtime, &tm);
char *buf = g_strdup_printf ("%04d:%02d:%02d %02d:%02d:%02d ",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]