Hi. I just discovered that using the 90 degree rotation buttons doesn't work any more in the preview, at least not for me. I can load up any picture, click on the "Crop and rotate" tab, click either of the rotate left or right icons, and then save. During the save, ufraw segfaults.
I tracked this down to the changes introduced on 2009-07-10 entitled "Fix preview and writing of rotated images. Patch by Frank van Maarseveen." What happens is that when the image is rotated using those buttons, rotatedWidth and rotatedHeight are swapped (in ufraw_preview.c:flip_image), but initialWidth and initialHeight aren't. Later, in ufraw_writer.c:ufraw_write_image around line 400, the height and width of the output image are calculated based on a rotated image.width and image.height but an unrotated initialWidth and initialHeight. The resulting numbers are bogus, causing breakage down the road. The attached patch fixes it for me, but it would be good to get somebody else's eyes on it as I'm not entirely sure if messing around with initialWidth and initialHeight will cause other problems. -- Bruce Guenter <[email protected]> http://untroubled.org/
diff --git a/ufraw_preview.c b/ufraw_preview.c
index ba256f1..5d22b49 100644
--- a/ufraw_preview.c
+++ b/ufraw_preview.c
@@ -2039,6 +2039,9 @@ static void flip_image(GtkWidget *widget, int flip)
temp = data->UF->rotatedWidth;
data->UF->rotatedWidth = data->UF->rotatedHeight;
data->UF->rotatedHeight = temp;
+ temp = data->UF->initialWidth;
+ data->UF->initialWidth = data->UF->initialHeight;
+ data->UF->initialHeight = temp;
temp = CFG->CropX1;
CFG->CropX1 = CFG->CropY1;
CFG->CropY1 = temp;
pgpUoBNyRFNq3.pgp
Description: PGP signature
------------------------------------------------------------------------------ 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-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ufraw-devel
