summaryrefslogtreecommitdiff
path: root/src
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
parent905cd5600e604aa1f9fe256ab3b4d7125695951e (diff)
make it work with fixed vignetting params
Diffstat (limited to 'src')
-rw-r--r--src/Stitch.cxx2
-rw-r--r--src/gipfel.cxx27
2 files changed, 16 insertions, 13 deletions
diff --git a/src/Stitch.cxx b/src/Stitch.cxx
index dbd0d53..1391fff 100644
--- a/src/Stitch.cxx
+++ b/src/Stitch.cxx
@@ -192,7 +192,7 @@ Stitch::color_calib(GipfelWidget::sample_mode_t m,
c2[l]=((uchar)MIN(rint((double) c2[l] * devign), 255));
}
- if (fabs(a1-a2) < 0.02 &&
+ if (fabs(a1-a2) < 0.01 &&
fabs(((double) c1[1]) / ((double) c1[0]) -
((double) c2[1]) / ((double) c2[0])) < 1.0 &&
fabs(((double) c1[2]) / ((double) c1[0]) -
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();