Update of /cvsroot/ufraw/ufraw
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26560
Modified Files:
ufraw_ufraw.c
Log Message:
Fix final output when applying vignetting and no geometry corrections.
Index: ufraw_ufraw.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ufraw.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- ufraw_ufraw.c 19 Nov 2009 05:24:02 -0000 1.216
+++ ufraw_ufraw.c 19 Nov 2009 05:44:21 -0000 1.217
@@ -34,6 +34,10 @@
#include "ufraw.h"
#ifdef HAVE_LENSFUN
+/* What about LF_MODIFY_ALL? */
+#define UF_LF_ALL (LF_MODIFY_TCA | LF_MODIFY_VIGNETTING | \
+ LF_MODIFY_DISTORTION | LF_MODIFY_GEOMETRY | LF_MODIFY_SCALE)
+
static void ufraw_convert_image_vignetting(ufraw_data *uf,
ufraw_image_data *img, UFRectangle *area);
static void ufraw_convert_image_lensfun(ufraw_data *uf, ufraw_image_data *img,
@@ -743,16 +747,19 @@
ufraw_image_data *img = &uf->Images[ufraw_first_phase];
UFRectangle area = { 0, 0, img->width, img->height };
ufraw_convert_image_vignetting(uf, img, &area);
- ufraw_image_data *img2 = &uf->Images[ufraw_lensfun_phase];
- img2->height = img->height;
- img2->width = img->width;
- img2->depth = img->depth;
- img2->rowstride = img2->width * img2->depth;
- img2->buffer = g_realloc(img2->buffer, img2->height * img2->rowstride);
- ufraw_convert_image_lensfun(uf, img, img2, &area);
- g_free(img->buffer);
- img->buffer = img2->buffer;
- img2->buffer = NULL;
+ if ((uf->modFlags & (UF_LF_ALL & ~LF_MODIFY_VIGNETTING)) != 0) {
+ /* Apply distortion, TCA and geometry */
+ ufraw_image_data *img2 = &uf->Images[ufraw_lensfun_phase];
+ img2->height = img->height;
+ img2->width = img->width;
+ img2->depth = img->depth;
+ img2->rowstride = img2->width * img2->depth;
+ img2->buffer = g_realloc(img2->buffer, img2->height *
img2->rowstride);
+ ufraw_convert_image_lensfun(uf, img, img2, &area);
+ g_free(img->buffer);
+ img->buffer = img2->buffer;
+ img2->buffer = NULL;
+ }
}
#endif
return UFRAW_SUCCESS;
@@ -760,10 +767,6 @@
#ifdef HAVE_LENSFUN
-/* What about LF_MODIFY_ALL? */
-#define UF_LF_ALL (LF_MODIFY_TCA | LF_MODIFY_VIGNETTING | \
- LF_MODIFY_DISTORTION | LF_MODIFY_GEOMETRY | LF_MODIFY_SCALE)
-
/* Lanczos kernel is precomputed in a table with this resolution
* The value below seems to be enough for HQ upscaling up to eight times
*/
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs