summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-03-15 15:58:00 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-03-15 15:58:00 +0100
commitc7a40505652adc10d29b2049bb4553cf91cec823 (patch)
treef114e85552b3110cc899e49f2f59e858c0ec8e06 /src/gipfel.cxx
parent905cd5600e604aa1f9fe256ab3b4d7125695951e (diff)
make it work with fixed vignetting params
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index 7aad38f..23a5c5f 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -484,13 +484,17 @@ int main(int argc, char** argv) {
}
if (stitch_flag) {
- int type = STITCH_PREVIEW;
+ int type = 0;
if (jpeg_flag) {
type = STITCH_JPEG;
} else if (tiff_flag) {
type = STITCH_TIFF;
- } else if (vignette_flag) {
- type = STITCH_VIGNETTE_CALIB;
+ } else {
+ type = STITCH_PREVIEW;
+ }
+
+ if (vignette_flag) {
+ type |= STITCH_VIGNETTE_CALIB;
}
stitch(bilinear_flag?GipfelWidget::BILINEAR:GipfelWidget::NEAREST,
@@ -564,12 +568,17 @@ stitch(GipfelWidget::sample_mode_t m,
st->load_image(argv[i]);
}
- if (type == STITCH_JPEG) {
+ if (type & STITCH_VIGNETTE_CALIB) {
+ st->color_calib(m, stitch_w, stitch_h, from, to);
+ //st->vignette_calib(m, stitch_w, stitch_h, from, to);
+ }
+
+ if (type & STITCH_JPEG) {
st->set_output((OutputImage*) new JPEGOutputImage(path, 90));
st->resample(m, stitch_w, stitch_h, from, to);
- } else if (type == STITCH_TIFF) {
+ } else if (type & STITCH_TIFF) {
for (int i=0; i<argc; i++) {
char buf[1024];
@@ -595,13 +604,7 @@ stitch(GipfelWidget::sample_mode_t m,
win->show(0, argv);
st->set_output((OutputImage*) img);
- if (type == STITCH_VIGNETTE_CALIB) {
- st->color_calib(m, stitch_w, stitch_h, from, to);
- //st->vignette_calib(m, stitch_w, stitch_h, from, to);
- st->resample(m, stitch_w, stitch_h, from, to);
- } else {
- st->resample(m, stitch_w, stitch_h, from, to);
- }
+ st->resample(m, stitch_w, stitch_h, from, to);
img->redraw();
Fl::run();