From 7d900b4ede22215413e4a0ddd1675c650ba3225f Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 25 Jun 2006 11:49:32 +0200 Subject: implement various helper methods --- src/GipfelWidget.H | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/GipfelWidget.H') diff --git a/src/GipfelWidget.H b/src/GipfelWidget.H index 1aebbea..563cd66 100644 --- a/src/GipfelWidget.H +++ b/src/GipfelWidget.H @@ -118,6 +118,9 @@ class GipfelWidget : public Fl_Widget { int update(); + int get_pixel(double a_view, double a_nick, + char *r, char *g, char *b); + void draw(); }; #endif -- cgit v1.2.3 From 52669d81a766eacc1b4e60d0cf477e35b598fcbe Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 2 Aug 2006 17:12:55 +0200 Subject: change Stitch to use OutputImage instead of DataImage --- src/GipfelWidget.H | 5 ++++ src/GipfelWidget.cxx | 52 +++++++++++++++++++++++++++++++-- src/JPEGOutputImage.H | 1 + src/Stitch.H | 13 +++++++-- src/Stitch.cxx | 79 +++++++++++++++++++++++++++++++++++++++++++-------- src/gipfel.cxx | 27 +++++++----------- 6 files changed, 143 insertions(+), 34 deletions(-) (limited to 'src/GipfelWidget.H') diff --git a/src/GipfelWidget.H b/src/GipfelWidget.H index 563cd66..50cb10d 100644 --- a/src/GipfelWidget.H +++ b/src/GipfelWidget.H @@ -49,6 +49,9 @@ class GipfelWidget : public Fl_Widget { int get_rel_track_width(Hill *m); + static int get_pixel_nearest(Fl_Image *img, double x, double y, + char *r, char *g, char *b); + public: GipfelWidget(int X,int Y,int W, int H); @@ -57,6 +60,8 @@ class GipfelWidget : public Fl_Widget { int load_image(char *file); int save_image(char *file); + + const char * get_image_filename(); int load_data(const char *file); diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 67695ad..34716e0 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -40,7 +40,6 @@ #include #include "Fl_Search_Chooser.H" -#include "DataImage.H" #include "choose_hill.H" #include "util.h" #include "GipfelWidget.H" @@ -148,6 +147,11 @@ GipfelWidget::load_image(char *file) { return 0; } +const char * +GipfelWidget::get_image_filename() { + return img_file; +} + int GipfelWidget::save_image(char *file) { char * args[32]; @@ -760,8 +764,50 @@ GipfelWidget::get_pixel(double a_view, double a_nick, return 1; } -//printf("===> %s: %f, %f -> %d %d\n", img_file, a_view, a_nick, px, py); - return DataImage::get_pixel_nearest(img, px + ((double) img->w()) / 2.0, + return get_pixel_nearest(img, px + ((double) img->w()) / 2.0, py + ((double) img->h()) / 2.0, r, g, b); } +int +GipfelWidget::get_pixel_nearest(Fl_Image *img, double x, double y, + char *r, char *g, char *b) { + if (isnan(x) || isnan(y)) { + return 1; + } + + if ( img->d() == 0 ) { + return 1; + } + + if (x < 0 || x >=img->w() || y < 0 || y >= img->h()) { + return 1; + } + long index = (y * img->w() * img->d()) + (x * img->d()); // X/Y -> buf index + switch ( img->count() ) { + case 1: { // bitmap + const char *buf = img->data()[0]; + switch ( img->d() ) { + case 1: { // 8bit + *r = *g = *b = *(buf+index); + break; + } + case 3: // 24bit + *r = *(buf+index+0); + *g = *(buf+index+1); + *b = *(buf+index+2); + break; + default: // ?? + printf("Not supported: chans=%d\n", img->d()); + return 1; + } + break; + } + default: // ?? pixmap, bit vals + printf("Not supported: count=%d\n", img->count()); + return 1; + } + + return 0; + +} + diff --git a/src/JPEGOutputImage.H b/src/JPEGOutputImage.H index bf1c6c1..31bdd76 100644 --- a/src/JPEGOutputImage.H +++ b/src/JPEGOutputImage.H @@ -23,6 +23,7 @@ #include extern "C" { #include +#undef HAVE_STDLIB_H } #include "OutputImage.H" diff --git a/src/Stitch.H b/src/Stitch.H index bc8436e..0bb6d48 100644 --- a/src/Stitch.H +++ b/src/Stitch.H @@ -21,13 +21,16 @@ #define STITCH_H #include "GipfelWidget.H" -#include "DataImage.H" +#include "OutputImage.H" #define MAX_PICS 256 + class Stitch { private: GipfelWidget *gipf[MAX_PICS]; + OutputImage *single_images[MAX_PICS]; + OutputImage *merged_image; public: @@ -36,8 +39,12 @@ class Stitch { ~Stitch(); int load_image(char *file); - - int resample(DataImage *img, + + OutputImage * set_output(OutputImage *img); + + OutputImage * set_output(const char *file, OutputImage *img); + + int resample(int w, int h, double view_start, double view_end); }; diff --git a/src/Stitch.cxx b/src/Stitch.cxx index 535995f..1fe3d88 100644 --- a/src/Stitch.cxx +++ b/src/Stitch.cxx @@ -26,6 +26,7 @@ #include +#include "OutputImage.H" #include "Stitch.H" static double pi_d = asin(1.0) * 2.0; @@ -33,7 +34,9 @@ static double pi_d = asin(1.0) * 2.0; Stitch::Stitch() { for (int i=0; iget_image_filename(); + if (img_file && strcmp(file, img_file) == 0) { + ret = single_images[i]; + single_images[i] = img; + break; + } + } + } + + return ret; +} + int -Stitch::resample(DataImage *img, +Stitch::resample(int w, int h, double view_start, double view_end) { - double step_view = (view_end - view_start) / img->w(); + double step_view = (view_end - view_start) / w; char r, g, b; - int y_off = img->h() / 2; - double radius = (double) img->w() / (view_end -view_start); + int y_off = h / 2; + int merged_pixel_set; + double radius = (double) w / (view_end -view_start); - for (int y=0; yh(); y++) { + if (merged_image) { + merged_image->init(w, h); + } + for (int i=0; iinit(w, h); + } + } + + for (int y=0; yw(); x++) { + for (int x=0; xget_pixel(a_view, a_nick, &r, &g, &b)==0) { - img->set_pixel(x, y, r, g, b); - break; + if (single_images[i]) { + single_images[i]->set_pixel(x, r, g, b); + } + if (!merged_pixel_set && merged_image) { + merged_image->set_pixel(x, r, g, b); + merged_pixel_set++; + } } } } + if (merged_image) { + merged_image->next_line(); + } + for (int i=0; inext_line(); + } + } + } - if (y % (img->h() / 100 + 1) == 0) { - img->redraw(); - Fl::check(); + if (merged_image) { + merged_image->done(); + } + for (int i=0; idone(); } } } diff --git a/src/gipfel.cxx b/src/gipfel.cxx index d8cea1c..5cd170a 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -41,7 +41,7 @@ #include "Fl_Value_Dial.H" #include "Fl_Search_Chooser.H" #include "GipfelWidget.H" -#include "DataImage.H" +#include "JPEGOutputImage.H" #include "Stitch.H" #include "choose_hill.H" #include "../config.h" @@ -62,7 +62,6 @@ Fl_Value_Input *i_view_lat, *i_view_long, *i_view_height; Fl_Box *b_viewpoint; Fl_Menu_Bar *mb; -static int tiffstitch(int stitch_w, int stitch_h, int argc, char **argv); static int stitch(int stitch_w, int stitch_h, int argc, char **argv); void set_values() { @@ -324,13 +323,13 @@ int main(int argc, char** argv) { char c, *sep, *tmp, **my_argv; char *view_point = NULL; int err, bflag = 0, dflag = 0, my_argc; - int stitch_flag = 0, tiff_flag = 0, stitch_w = 2000, stitch_h = 500; + int stitch_flag = 0, stitch_w = 2000, stitch_h = 500; Fl_Window *control_win, *view_win; Fl_Scroll *scroll; err = 0; - while ((c = getopt(argc, argv, "d:v:sw:b:t")) != EOF) { + while ((c = getopt(argc, argv, "d:v:sw:b:")) != EOF) { switch (c) { case 'h': usage(); @@ -345,10 +344,6 @@ int main(int argc, char** argv) { case 's': stitch_flag++; break; - case 't': - stitch_flag++; - tiff_flag++; - break; case 'w': stitch_w = atoi(optarg); break; @@ -374,11 +369,7 @@ int main(int argc, char** argv) { } if (stitch_flag) { - if (tiff_flag) { - tiffstitch(stitch_w, stitch_h, my_argc, my_argv); - } else { - stitch(stitch_w, stitch_h, my_argc, my_argv); - } + stitch(stitch_w, stitch_h, my_argc, my_argv); exit(0); } @@ -427,6 +418,7 @@ int main(int argc, char** argv) { return Fl::run(); } +#if 0 static int tiffstitch(int stitch_w, int stitch_h, int argc, char **argv) { char buf[256]; @@ -445,6 +437,7 @@ static int tiffstitch(int stitch_w, int stitch_h, int argc, char **argv) { return 0; } +#endif static int stitch(int stitch_w, int stitch_h, int argc, char **argv) { @@ -455,16 +448,18 @@ static int stitch(int stitch_w, int stitch_h, int argc, char **argv) { for (int i=0; iload_image(argv[i]); } - +#if 0 win = new Fl_Window(0,0, 1000, stitch_h); scroll = new Fl_Scroll(0, 0, win->w(), win->h()); - DataImage *img = new DataImage(0, 0, stitch_w, stitch_h); + PreviewOutputImage *img = new PreviewOutputImage(); win->resizable(scroll); win->show(0, argv); st->resample(img, 0.0, 7.0); +#endif - img->write_jpeg("/tmp/bla.jpg", 90); + st->set_output((OutputImage*) new JPEGOutputImage("/tmp/bla.jpg", 90)); + st->resample(stitch_w, stitch_h, 0.0, 7.0); Fl::run(); return 0; -- cgit v1.2.3 From 732e18ac89479a9a789068b32145825bb0c98ba4 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 2 Aug 2006 18:00:23 +0200 Subject: implement PreviewOutputImage --- src/DataImage.H | 55 ------------- src/DataImage.cxx | 198 --------------------------------------------- src/GipfelWidget.H | 3 + src/GipfelWidget.cxx | 15 +++- src/Makefile.am | 4 +- src/OutputImage.H | 2 +- src/PreviewOutputImage.H | 53 ++++++++++++ src/PreviewOutputImage.cxx | 93 +++++++++++++++++++++ src/gipfel.cxx | 11 +-- 9 files changed, 170 insertions(+), 264 deletions(-) delete mode 100644 src/DataImage.H delete mode 100644 src/DataImage.cxx create mode 100644 src/PreviewOutputImage.H create mode 100644 src/PreviewOutputImage.cxx (limited to 'src/GipfelWidget.H') diff --git a/src/DataImage.H b/src/DataImage.H deleted file mode 100644 index 1846857..0000000 --- a/src/DataImage.H +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright 2006 by Johannes Hofmann -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// - -#ifndef DATAIMAGE_H -#define DATAIMAGE_H - -#include -#include - -class DataImage : public Fl_Widget { - private: - int d; - uchar *data; - - - public: - DataImage(int X, int Y, int W, int H, int channels=3); - - ~DataImage(); - - int set_pixel(int x, int y, char r, char g, char b); - - void draw(); - - int write_jpeg(const char *file, int quality); - - int write_tiff(const char *file); - - static int get_pixel(Fl_Image *img, int x, int y, - char *r, char *g, char *b); - - static int get_pixel_bilinear(Fl_Image *img, double x, double y, - char *r, char *g, char *b); - - static int get_pixel_nearest(Fl_Image *img, double x, double y, - char *r, char *g, char *b); -}; - -#endif diff --git a/src/DataImage.cxx b/src/DataImage.cxx deleted file mode 100644 index 21aa226..0000000 --- a/src/DataImage.cxx +++ /dev/null @@ -1,198 +0,0 @@ -// -// DataImage routines. -// -// Copyright 2006 by Johannes Hofmann -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// - -#include -#include -#include -#include -extern "C" { -#include -#include -} - -#include - -#include "DataImage.H" - -DataImage::DataImage(int X, int Y, int W, int H, int channels): Fl_Widget(X, Y, W, H) { - d = channels; - data = (uchar*) malloc(W * H * d); - memset(data, 0, W * H * d); -} - -DataImage::~DataImage() { - -} - - -int -DataImage::set_pixel(int x, int y, char r, char g, char b) { - if (x < 0 || x >= w() || y < 0 || y >= h()) { - return 1; - } - - long index = (y * w() * d + (x * d)); // X/Y -> buf index - *(data+index+0) = r; - *(data+index+1) = g; - *(data+index+2) = b; - if (d == 4) { - *(data+index+3) = 255; - } - - return 0; -} - - -void -DataImage::draw() { - fl_push_clip(x(), y(), w(), h()); - - fl_draw_image(data, x(), y(), w(), h(), d); - - fl_pop_clip(); -} - -int -DataImage::get_pixel_bilinear(Fl_Image *img, double x, double y, - char *r, char *g, char *b) { - - -} - -int -DataImage::get_pixel_nearest(Fl_Image *img, double x, double y, - char *r, char *g, char *b) { - if (isnan(x) || isnan(y)) { - return 1; - } else { - return get_pixel(img, (int) rint(x), (int) rint(y), r, g, b); - } -} - -int -DataImage::get_pixel(Fl_Image *img, int x, int y, - char *r, char *g, char *b) { - if ( img->d() == 0 ) { - return 1; - } - - if (x < 0 || x >=img->w() || y < 0 || y >= img->h()) { - return 1; - } - long index = (y * img->w() * img->d()) + (x * img->d()); // X/Y -> buf index - switch ( img->count() ) { - case 1: { // bitmap - const char *buf = img->data()[0]; - switch ( img->d() ) { - case 1: { // 8bit - *r = *g = *b = *(buf+index); - break; - } - case 3: // 24bit - *r = *(buf+index+0); - *g = *(buf+index+1); - *b = *(buf+index+2); - break; - default: // ?? - printf("Not supported: chans=%d\n", img->d()); - return 1; - } - break; - } - default: // ?? pixmap, bit vals - printf("Not supported: count=%d\n", img->count()); - exit(1); - } - - return 0; -} - - -int -DataImage::write_jpeg(const char *file, int quality) { - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - FILE *outfile; - JSAMPROW row_pointer[1]; - int row_stride; - - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - - if ((outfile = fopen(file, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", file); - return 1; - } - - jpeg_stdio_dest(&cinfo, outfile); - cinfo.image_width = w(); - cinfo.image_height = h(); - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; - - jpeg_set_defaults(&cinfo); - jpeg_set_quality(&cinfo, quality, TRUE); - - jpeg_start_compress(&cinfo, TRUE); - - row_stride = w() * d; /* JSAMPLEs per row in image_buffer */ - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & data[cinfo.next_scanline * row_stride]; - jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - jpeg_finish_compress(&cinfo); - fclose(outfile); - jpeg_destroy_compress(&cinfo); - - return 0; -} - -int -DataImage::write_tiff(const char *file) { - TIFF *output; - uint32 width, height; - char *raster; - - // Open the output image - if((output = TIFFOpen(file, "w")) == NULL){ - fprintf(stderr, "can't open %s\n", file); - return 1; - } - - // Write the tiff tags to the file - TIFFSetField(output, TIFFTAG_IMAGEWIDTH, w()); - TIFFSetField(output, TIFFTAG_IMAGELENGTH, h()); - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); - TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, d); - - // Actually write the image - if(TIFFWriteEncodedStrip(output, 0, data, w() * h() * d) == 0){ - fprintf(stderr, "Could not write image\n"); - return 2; - } - - TIFFClose(output); - return 0; -} diff --git a/src/GipfelWidget.H b/src/GipfelWidget.H index 50cb10d..4e74cb4 100644 --- a/src/GipfelWidget.H +++ b/src/GipfelWidget.H @@ -52,6 +52,9 @@ class GipfelWidget : public Fl_Widget { static int get_pixel_nearest(Fl_Image *img, double x, double y, char *r, char *g, char *b); + static int get_pixel(Fl_Image *img, int x, int y, + char *r, char *g, char *b); + public: GipfelWidget(int X,int Y,int W, int H); diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 34716e0..c4fe032 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -770,11 +770,18 @@ GipfelWidget::get_pixel(double a_view, double a_nick, int GipfelWidget::get_pixel_nearest(Fl_Image *img, double x, double y, - char *r, char *g, char *b) { - if (isnan(x) || isnan(y)) { - return 1; - } + char *r, char *g, char *b) { + if (isnan(x) || isnan(y)) { + return 1; + } else { + return get_pixel(img, (int) rint(x), (int) rint(y), r, g, b); + } +} + +int +GipfelWidget::get_pixel(Fl_Image *img, int x, int y, + char *r, char *g, char *b) { if ( img->d() == 0 ) { return 1; } diff --git a/src/Makefile.am b/src/Makefile.am index 466b772..b686716 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,8 @@ gipfel_SOURCES = \ choose_hill.cxx \ Stitch.cxx \ OutputImage.cxx \ - JPEGOutputImage.cxx + JPEGOutputImage.cxx \ + PreviewOutputImage.cxx noinst_HEADERS = \ GipfelWidget.H \ @@ -30,4 +31,5 @@ noinst_HEADERS = \ Stitch.H \ OutputImage.H \ JPEGOutputImage.H \ + PreviewOutputImage.H \ util.h diff --git a/src/OutputImage.H b/src/OutputImage.H index 9a99548..e7ab4e5 100644 --- a/src/OutputImage.H +++ b/src/OutputImage.H @@ -23,7 +23,7 @@ class OutputImage { private: - int w, h, initialized, line; + int W, H, initialized, line; public: OutputImage(); diff --git a/src/PreviewOutputImage.H b/src/PreviewOutputImage.H new file mode 100644 index 0000000..02e60c5 --- /dev/null +++ b/src/PreviewOutputImage.H @@ -0,0 +1,53 @@ +// +// Copyright 2006 by Johannes Hofmann +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// + +#ifndef PREVIEWOUTPUTIMAGE_H +#define PREVIEWOUTPUTIMAGE_H + +#include + +#include +#include + +#include "OutputImage.H" + +class PreviewOutputImage : OutputImage , public Fl_Widget { + private: + uchar *data; + int d; + int row; + + public: + PreviewOutputImage(int X, int Y, int W, int H); + + ~PreviewOutputImage(); + + void draw(); + + protected: + int init_internal(int w, int h); + + int set_pixel_internal(int x, char r, char g, char b); + + int next_line_internal(); + + int done_internal(); +}; + +#endif diff --git a/src/PreviewOutputImage.cxx b/src/PreviewOutputImage.cxx new file mode 100644 index 0000000..ba86edc --- /dev/null +++ b/src/PreviewOutputImage.cxx @@ -0,0 +1,93 @@ +// +// DataImage routines. +// +// Copyright 2006 by Johannes Hofmann +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// + +#include +#include +#include + +#include +#include + +#include "PreviewOutputImage.H" + +PreviewOutputImage::PreviewOutputImage(int X, int Y, int W, int H): Fl_Widget(X, Y, W, H) { + d = 3; + data = NULL; +} + +PreviewOutputImage::~PreviewOutputImage() { + if (data) { + free(data); + } +} + +int +PreviewOutputImage::init_internal(int w, int h) { + data = (uchar*) malloc(w * h * d); + memset(data, 0, w * h * d); + row = 0; + size(w, h); + return 0; +} + + + +int +PreviewOutputImage::set_pixel_internal(int x, char r, char g, char b) { + if (!data) { + return 1; + } + + long index = (row * w() * d + (x * d)); + *(data+index+0) = r; + *(data+index+1) = g; + *(data+index+2) = b; + + return 0; +} + +int +PreviewOutputImage::next_line_internal() { + row++; + if (row % (h() / 100) == 0) { + redraw(); + Fl::check(); + } + return 0; +} + +int +PreviewOutputImage::done_internal() { + return 0; +} + +void +PreviewOutputImage::draw() { + if (!data) { + return; + } + fl_push_clip(x(), y(), w(), h()); + + fl_draw_image(data, x(), y(), w(), h(), d); + + fl_pop_clip(); +} + diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 5cd170a..5dd69a7 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -42,6 +42,7 @@ #include "Fl_Search_Chooser.H" #include "GipfelWidget.H" #include "JPEGOutputImage.H" +#include "PreviewOutputImage.H" #include "Stitch.H" #include "choose_hill.H" #include "../config.h" @@ -448,18 +449,18 @@ static int stitch(int stitch_w, int stitch_h, int argc, char **argv) { for (int i=0; iload_image(argv[i]); } -#if 0 + win = new Fl_Window(0,0, 1000, stitch_h); scroll = new Fl_Scroll(0, 0, win->w(), win->h()); - PreviewOutputImage *img = new PreviewOutputImage(); + PreviewOutputImage *img = new PreviewOutputImage(0, 0, stitch_w, stitch_h); win->resizable(scroll); win->show(0, argv); - st->resample(img, 0.0, 7.0); -#endif - st->set_output((OutputImage*) new JPEGOutputImage("/tmp/bla.jpg", 90)); + //st->set_output((OutputImage*) new JPEGOutputImage("/tmp/bla.jpg", 90)); + st->set_output((OutputImage*) img); st->resample(stitch_w, stitch_h, 0.0, 7.0); + img->redraw(); Fl::run(); return 0; -- cgit v1.2.3 From feae8373e6fbdafe5368410ba0ac51059f7155f7 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 9 Aug 2006 22:19:00 +0200 Subject: Header and Copyright cleanup --- src/Fl_Search_Chooser.H | 4 ---- src/Fl_Value_Dial.H | 8 -------- src/Fl_Value_Dial.cxx | 4 ---- src/GipfelWidget.H | 4 +--- src/Hill.H | 2 -- src/Panorama.H | 2 -- src/Projection.H | 4 +--- src/ProjectionTangential.H | 2 -- src/choose_hill.H | 6 ------ 9 files changed, 2 insertions(+), 34 deletions(-) (limited to 'src/GipfelWidget.H') diff --git a/src/Fl_Search_Chooser.H b/src/Fl_Search_Chooser.H index 6bb71fe..c87f0de 100644 --- a/src/Fl_Search_Chooser.H +++ b/src/Fl_Search_Chooser.H @@ -1,6 +1,4 @@ // -// "$Id: Fl_Value_Dial.H,v 1.2 2005/05/18 11:34:30 hofmann Exp $" -// // Value dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2004 by Bill Spitzak and others. @@ -20,8 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// #ifndef FL_SEARCH_CHOOSER_H #define FL_SEARCH_CHOOSER_H diff --git a/src/Fl_Value_Dial.H b/src/Fl_Value_Dial.H index 7d41aa5..f9ac18c 100644 --- a/src/Fl_Value_Dial.H +++ b/src/Fl_Value_Dial.H @@ -1,6 +1,4 @@ // -// "$Id: Fl_Value_Dial.H,v 1.2 2005/05/18 11:34:30 hofmann Exp $" -// // Value dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2004 by Bill Spitzak and others. @@ -20,8 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// #ifndef Fl_Value_Dial_H #define Fl_Value_Dial_H @@ -45,7 +41,3 @@ class Fl_Value_Dial : public Fl_Dial { }; #endif - -// -// End of "$Id: Fl_Value_Dial.H,v 1.2 2005/05/18 11:34:30 hofmann Exp $". -// diff --git a/src/Fl_Value_Dial.cxx b/src/Fl_Value_Dial.cxx index 6e5c35c..c837930 100644 --- a/src/Fl_Value_Dial.cxx +++ b/src/Fl_Value_Dial.cxx @@ -1,6 +1,4 @@ // -// "$Id: Fl_Value_Dial.cxx,v 1.2 2005/05/18 11:34:30 hofmann Exp $" -// // Value dial widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2004 by Bill Spitzak and others. @@ -20,8 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// #include #include diff --git a/src/GipfelWidget.H b/src/GipfelWidget.H index 4e74cb4..7bcd3c0 100644 --- a/src/GipfelWidget.H +++ b/src/GipfelWidget.H @@ -1,7 +1,5 @@ // -// "$Id: GipfelWidget.H,v 1.22 2005/06/22 19:47:19 hofmann Exp $" -// -// Copyright 2005 by Johannes Hofmann +// Copyright 2006 by Johannes Hofmann // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public diff --git a/src/Hill.H b/src/Hill.H index fde7a89..13d7d64 100644 --- a/src/Hill.H +++ b/src/Hill.H @@ -1,6 +1,4 @@ // -// "$Id: Hill.H,v 1.16 2005/06/22 20:40:35 hofmann Exp $" -// // Copyright 2005 by Johannes Hofmann // // This library is free software; you can redistribute it and/or diff --git a/src/Panorama.H b/src/Panorama.H index 20d3213..a538809 100644 --- a/src/Panorama.H +++ b/src/Panorama.H @@ -1,6 +1,4 @@ // -// "$Id: Panorama.H,v 1.20 2005/06/22 19:47:20 hofmann Exp $" -// // Copyright 2005 by Johannes Hofmann // // This library is free software; you can redistribute it and/or diff --git a/src/Projection.H b/src/Projection.H index f6de5ae..0a6ec81 100644 --- a/src/Projection.H +++ b/src/Projection.H @@ -1,7 +1,5 @@ // -// "$Id: Panorama.H,v 1.20 2005/06/22 19:47:20 hofmann Exp $" -// -// Copyright 2005 by Johannes Hofmann +// Copyright 2006 by Johannes Hofmann // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public diff --git a/src/ProjectionTangential.H b/src/ProjectionTangential.H index 74a4b59..e74511f 100644 --- a/src/ProjectionTangential.H +++ b/src/ProjectionTangential.H @@ -1,6 +1,4 @@ // -// "$Id: Panorama.H,v 1.20 2005/06/22 19:47:20 hofmann Exp $" -// // Copyright 2005 by Johannes Hofmann // // This library is free software; you can redistribute it and/or diff --git a/src/choose_hill.H b/src/choose_hill.H index 1387868..e424d70 100644 --- a/src/choose_hill.H +++ b/src/choose_hill.H @@ -1,8 +1,4 @@ // -// "$Id: Fl_Value_Dial.H,v 1.2 2005/05/18 11:34:30 hofmann Exp $" -// -// Value dial header file for the Fast Light Tool Kit (FLTK). -// // Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or @@ -20,8 +16,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// #ifndef CHOOSE_HILL_H #define CHOOSE_HILL_H -- cgit v1.2.3