summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index 1e038d2..8add46a 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -65,7 +65,7 @@ static Fl_Menu_Bar *mb;
#define STITCH_JPEG 2
#define STITCH_TIFF 4
-static int stitch(GipfelWidget::sample_mode_t m , int b_16,
+static int stitch(ScanImage::mode_t m , int b_16,
int stitch_w, int stitch_h,
double from, double to, int type, const char *path, int argc, char **argv);
@@ -129,12 +129,11 @@ void set_values() {
}
void quit_cb() {
+ if (Fl::event() == FL_SHORTCUT && Fl::event_key() == FL_Escape)
+ return; // ignore Escape
exit(0);
}
-void dummy_cb() {
-}
-
void open_cb() {
char *file = fl_file_chooser("Open File?", "*.jpg", img_file);
if (file) {
@@ -286,6 +285,7 @@ void about_cb() {
fl_message("gipfel -- Photogrammetry for Mountain Images.\n"
"Version %s\n\n"
"(c) Johannes Hofmann 2006-2009\n\n"
+ "Homepage: http://www.ecademix.com/JohannesHofmann\n\n"
"Default datafile from http://www.viewfinderpanoramas.org/ and\n"
"http://www.alpin-koordinaten.de\n",
VERSION);
@@ -602,7 +602,7 @@ int main(int argc, char** argv) {
type = STITCH_PREVIEW;
}
- return stitch(bicubic_flag?GipfelWidget::BICUBIC:GipfelWidget::NEAREST,
+ return stitch(bicubic_flag ? ScanImage::BICUBIC : ScanImage::NEAREST,
b_16_flag,
stitch_w, stitch_h, stitch_from, stitch_to,
type, outpath, my_argc, my_argv);
@@ -620,10 +620,10 @@ int main(int argc, char** argv) {
Fl::scheme("plastic");
control_win = create_control_window();
- control_win->callback((Fl_Callback*) dummy_cb);
+ control_win->callback((Fl_Callback*) quit_cb);
view_win = new Fl_Window(800, 600);
- view_win->callback((Fl_Callback*) dummy_cb);
+ view_win->callback((Fl_Callback*) quit_cb);
// The Fl_Group is used to avoid FL_DAMAGE_ALL in Fl_Scroll::position
Fl_Group *g = new Fl_Group(0, 0, view_win->w(), view_win->h());
@@ -667,7 +667,7 @@ int main(int argc, char** argv) {
}
static int
-stitch(GipfelWidget::sample_mode_t m, int b_16,
+stitch(ScanImage::mode_t m, int b_16,
int stitch_w, int stitch_h, double from, double to,
int type, const char *path, int argc, char **argv) {
@@ -685,7 +685,7 @@ stitch(GipfelWidget::sample_mode_t m, int b_16,
} else if (type & STITCH_TIFF) {
- st->set_output(new TIFFOutputImage(path, 90));
+ st->set_output(new TIFFOutputImage(path, b_16 ? 16 : 8));
st->resample(m, stitch_w, stitch_h, from, to);
} else {