summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GipfelWidget.cxx2
-rw-r--r--src/ImageMetaData.H2
-rw-r--r--src/ImageMetaData.cxx22
3 files changed, 3 insertions, 23 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx
index fdd2b4f..f9b5d21 100644
--- a/src/GipfelWidget.cxx
+++ b/src/GipfelWidget.cxx
@@ -86,7 +86,7 @@ GipfelWidget::load_image(char *file) {
mb->add("Center Peak", 0, (Fl_Callback*) center_cb, this);
// try to retrieve gipfel data from JPEG meta data
- md->load_image(file, img->w());
+ md->load_image(file);
set_view_long(md->get_longitude());
set_view_lat(md->get_latitude());
set_view_height(md->get_height());
diff --git a/src/ImageMetaData.H b/src/ImageMetaData.H
index b7a5959..90b13c9 100644
--- a/src/ImageMetaData.H
+++ b/src/ImageMetaData.H
@@ -34,7 +34,7 @@ class ImageMetaData {
ImageMetaData();
~ImageMetaData();
- int load_image(char *name, int img_width);
+ int load_image(char *name);
int save_image(char *in_img, char *out_img);
const char *get_manufacturer();
diff --git a/src/ImageMetaData.cxx b/src/ImageMetaData.cxx
index d79b937..2693851 100644
--- a/src/ImageMetaData.cxx
+++ b/src/ImageMetaData.cxx
@@ -50,15 +50,12 @@ ImageMetaData::clear() {
}
int
-ImageMetaData::load_image(char *name, int img_width) {
+ImageMetaData::load_image(char *name) {
int ret;
clear();
ret = load_image_jpgcom(name);
- if (ret == 2) { // old format
- focal_length_35mm = scale * 35.0 / (double) img_width;
- }
load_image_exif(name); // fill missing values from exif data
@@ -161,7 +158,6 @@ ImageMetaData::load_image_exif(char *name) {
}
-#define GIPFEL_FORMAT_1 "gipfel: longitude %lf, latitude %lf, height %lf, direction %lf, nick %lf, tilt %lf, scale %lf, projection type %d"
#define GIPFEL_FORMAT_2 "gipfel: longitude %lf, latitude %lf, height %lf, direction %lf, nick %lf, tilt %lf, focal_length_35mm %lf, projection type %d, k0 %lf, k1 %lf, x0 %lf"
int
@@ -204,22 +200,6 @@ ImageMetaData::load_image_jpgcom(char *name) {
ret = 0;
break;
- } else if (sscanf(buf, GIPFEL_FORMAT_1,
- &lo, &la, &he, &dir, &ni, &ti, &fr, &pt) >= 7) {
-
- longitude = lo;
- latitude = la;
- height = he;
- direction = dir;
- nick = ni;
- tilt = ti;
- scale = fr;
- projection_type = pt;
-
- ret = 2; // special return value for compatibility with
- // old format
-
- break;
}
}