diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-10-30 18:37:27 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-10-30 18:37:27 +0100 |
commit | 19bec8bde89fc08f6497a346b2121bcd96d1f528 (patch) | |
tree | 69b6677b273fc8062edfb70f2b38d545c56ad92d /src/GipfelWidget.cxx | |
parent | da5192170bb7ed19a8eadbc8ac393b0fa222c7df (diff) |
fix problem with compatibility code
Diffstat (limited to 'src/GipfelWidget.cxx')
-rw-r--r-- | src/GipfelWidget.cxx | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 2efd231..a1982d5 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -104,23 +104,17 @@ GipfelWidget::load_image(char *file) { mb->box(FL_NO_BOX); mb->add("Center Peak", 0, (Fl_Callback*) center_cb, this); - // try to retrieve gipfel data from JPEG comment section + // try to retrieve gipfel data from JPEG meta data md = new ImageMetaData(); - ret = md->load_image(file); - if (ret != 1) { - set_view_long(md->get_longitude()); - set_view_lat(md->get_latitude()); - set_view_height(md->get_height()); - set_center_angle(md->get_direction()); - set_nick_angle(md->get_nick()); - set_tilt_angle(md->get_tilt()); - set_projection((Projection::Projection_t) md->get_projection_type()); - if (ret == 2) { // special compatibility return code for old format - set_scale(md->get_focallength_sensor_ratio()); - } else { - set_scale(md->get_focallength_sensor_ratio() * img->w()); - } - } + md->load_image(file, img->w()); + set_view_long(md->get_longitude()); + set_view_lat(md->get_latitude()); + set_view_height(md->get_height()); + set_center_angle(md->get_direction()); + set_nick_angle(md->get_nick()); + set_tilt_angle(md->get_tilt()); + set_projection((Projection::Projection_t) md->get_projection_type()); + set_scale(md->get_focallength_sensor_ratio() * img->w()); delete md; |