instead of the shorter "f".
Warning: custom overlay info string has to be modified since old names are no
more recognized, one can reset it to default through Preferences > Advanced.
#define BAR_EXIF_DATA_COLUMN_WIDTH 250
ExifUI ExifUIList[]={
- { 0, 0, EXIF_UI_IFSET, "fCamera"},
- { 0, 0, EXIF_UI_IFSET, "fDateTime"},
- { 0, 0, EXIF_UI_IFSET, "fShutterSpeed"},
- { 0, 0, EXIF_UI_IFSET, "fAperture"},
- { 0, 0, EXIF_UI_IFSET, "fExposureBias"},
- { 0, 0, EXIF_UI_IFSET, "fISOSpeedRating"},
- { 0, 0, EXIF_UI_IFSET, "fFocalLength"},
- { 0, 0, EXIF_UI_IFSET, "fFocalLength35mmFilm"},
- { 0, 0, EXIF_UI_IFSET, "fFlash"},
- { 0, 0, EXIF_UI_IFSET, "fSubjectDistance"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.Camera"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.DateTime"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.ShutterSpeed"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.Aperture"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.ExposureBias"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.ISOSpeedRating"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.FocalLength"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.FocalLength35mmFilm"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.Flash"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.SubjectDistance"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Photo.ExposureProgram"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Photo.MeteringMode"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Photo.LightSource"},
- { 0, 0, EXIF_UI_IFSET, "fColorProfile"},
- { 0, 0, EXIF_UI_IFSET, "fSubjectDistance"},
- { 0, 0, EXIF_UI_IFSET, "fResolution"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.ColorProfile"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.SubjectDistance"},
+ { 0, 0, EXIF_UI_IFSET, "formatted.Resolution"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Image.Orientation"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Image.ImageDescription"},
{ 0, 0, EXIF_UI_IFSET, "Exif.Image.Copyright"},
{
gchar *text;
- text = exif_get_data_as_text(exif, "fDateTime");
+ text = exif_get_data_as_text(exif, "formatted.DateTime");
if (text)
{
struct tm t = { 0 };
return TRUE;
}
-static gchar *exif_build_fCamera(ExifData *exif)
+static gchar *exif_build_formatted_Camera(ExifData *exif)
{
gchar *text;
gchar *make = exif_get_data_as_text(exif, "Exif.Image.Make");
return text;
}
-static gchar *exif_build_fDateTime(ExifData *exif)
+static gchar *exif_build_formatted_DateTime(ExifData *exif)
{
gchar *text = exif_get_data_as_text(exif, "Exif.Photo.DateTimeOriginal");
gchar *subsec = NULL;
return text;
}
-static gchar *exif_build_fShutterSpeed(ExifData *exif)
+static gchar *exif_build_formatted_ShutterSpeed(ExifData *exif)
{
ExifRational *r;
return NULL;
}
-static gchar *exif_build_fAperture(ExifData *exif)
+static gchar *exif_build_formatted_Aperture(ExifData *exif)
{
double n;
return g_strdup_printf("f/%.1f", n);
}
-static gchar *exif_build_fExposureBias(ExifData *exif)
+static gchar *exif_build_formatted_ExposureBias(ExifData *exif)
{
ExifRational *r;
gint sign;
return g_strdup_printf("%+.1f", n);
}
-static gchar *exif_build_fFocalLength(ExifData *exif)
+static gchar *exif_build_formatted_FocalLength(ExifData *exif)
{
double n;
return g_strdup_printf("%.0f mm", n);
}
-static gchar *exif_build_fFocalLength35mmFilm(ExifData *exif)
+static gchar *exif_build_formatted_FocalLength35mmFilm(ExifData *exif)
{
gint n;
double f, c;
return NULL;
}
-static gchar *exif_build_fISOSpeedRating(ExifData *exif)
+static gchar *exif_build_formatted_ISOSpeedRating(ExifData *exif)
{
gchar *text;
return text;
}
-static gchar *exif_build_fSubjectDistance(ExifData *exif)
+static gchar *exif_build_formatted_SubjectDistance(ExifData *exif)
{
ExifRational *r;
gint sign;
return g_strdup_printf("%.3f m", n);
}
-static gchar *exif_build_fFlash(ExifData *exif)
+static gchar *exif_build_formatted_Flash(ExifData *exif)
{
/* grr, flash is a bitmask... */
GString *string;
return text;
}
-static gchar *exif_build_fResolution(ExifData *exif)
+static gchar *exif_build_formatted_Resolution(ExifData *exif)
{
ExifRational *rx, *ry;
gchar *units;
return text;
}
-static gchar *exif_build_fColorProfile(ExifData *exif)
+static gchar *exif_build_formatted_ColorProfile(ExifData *exif)
{
const gchar *name = "";
const gchar *source = "";
/* List of custom formatted pseudo-exif tags */
-#define EXIF_FORMATTED_TAG(name, label) { #name, label, exif_build##_##name }
+#define EXIF_FORMATTED_TAG(name, label) { "formatted."#name, label, exif_build_formatted##_##name }
ExifFormattedText ExifFormattedList[] = {
- EXIF_FORMATTED_TAG(fCamera, N_("Camera")),
- EXIF_FORMATTED_TAG(fDateTime, N_("Date")),
- EXIF_FORMATTED_TAG(fShutterSpeed, N_("Shutter speed")),
- EXIF_FORMATTED_TAG(fAperture, N_("Aperture")),
- EXIF_FORMATTED_TAG(fExposureBias, N_("Exposure bias")),
- EXIF_FORMATTED_TAG(fISOSpeedRating, N_("ISO sensitivity")),
- EXIF_FORMATTED_TAG(fFocalLength, N_("Focal length")),
- EXIF_FORMATTED_TAG(fFocalLength35mmFilm,N_("Focal length 35mm")),
- EXIF_FORMATTED_TAG(fSubjectDistance, N_("Subject distance")),
- EXIF_FORMATTED_TAG(fFlash, N_("Flash")),
- EXIF_FORMATTED_TAG(fResolution, N_("Resolution")),
- EXIF_FORMATTED_TAG(fColorProfile, N_("Color profile")),
+ EXIF_FORMATTED_TAG(Camera, N_("Camera")),
+ EXIF_FORMATTED_TAG(DateTime, N_("Date")),
+ EXIF_FORMATTED_TAG(ShutterSpeed, N_("Shutter speed")),
+ EXIF_FORMATTED_TAG(Aperture, N_("Aperture")),
+ EXIF_FORMATTED_TAG(ExposureBias, N_("Exposure bias")),
+ EXIF_FORMATTED_TAG(ISOSpeedRating, N_("ISO sensitivity")),
+ EXIF_FORMATTED_TAG(FocalLength, N_("Focal length")),
+ EXIF_FORMATTED_TAG(FocalLength35mmFilm, N_("Focal length 35mm")),
+ EXIF_FORMATTED_TAG(SubjectDistance, N_("Subject distance")),
+ EXIF_FORMATTED_TAG(Flash, N_("Flash")),
+ EXIF_FORMATTED_TAG(Resolution, N_("Resolution")),
+ EXIF_FORMATTED_TAG(ColorProfile, N_("Color profile")),
{ NULL, NULL, NULL }
};
gchar *exif_get_formatted_by_key(ExifData *exif, const gchar *key, gint *key_valid)
{
- /* must begin with f, else not formatted */
- if (key[0] == 'f')
+ if (strncmp(key, "formatted.", 10) == 0)
{
gint i;
#define DEFAULT_OVERLAY_INFO "%collection%(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
"%res%|%date%|%size%\n" \
- "%fAperture%|%fShutterSpeed%|%fISOSpeedRating%|%fFocalLength%|%fExposureBias%\n" \
- "%fCamera%|%fFlash%" \
+ "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating%|%formatted.FocalLength%|%formatted.ExposureBias%\n" \
+ "%formatted.Camera%|%formatted.Flash%" \
#include "typedefs.h"
_("<i>%name%</i> results in the filename of the picture.\n"
"Also available: <i>%collection%</i>, <i>%number%</i>, <i>%total%</i>, <i>%date%</i>,\n"
"<i>%size%</i> (filesize), <i>%width%</i>, <i>%height%</i>, <i>%res%</i> (resolution)\n"
- "To access exif data use the exif name, e. g. <i>%fCamera%</i> is the formatted camera name,\n"
+ "To access exif data use the exif name, e. g. <i>%formatted.Camera%</i> is the formatted camera name,\n"
"<i>%Exif.Photo.DateTimeOriginal%</i> the date of the original shot.\n"
- "<i>%fCamera:20</i> notation will truncate the displayed data to 20 characters and will add 3 dots at the end to denote the truncation.\n"
+ "<i>%formatted.Camera:20</i> notation will truncate the displayed data to 20 characters and will add 3 dots at the end to denote the truncation.\n"
"If two or more variables are connected with the |-sign, it prints available variables with a separator.\n"
- "<i>%fShutterSpeed%</i>|<i>%fISOSpeedRating%</i>|<i>%fFocalLength%</i> could show \"1/20s - 400 - 80 mm\" or \"1/200 - 80 mm\",\n"
+ "<i>%formatted.ShutterSpeed%</i>|<i>%formatted.ISOSpeedRating%</i>|<i>%formatted.FocalLength%</i> could show \"1/20s - 400 - 80 mm\" or \"1/200 - 80 mm\",\n"
"if there's no ISO information in the Exif data.\n"
"If a line is empty, it is removed. This allows to add lines that totally disappear when no data is available.\n"
));