On Fri, Jul 31, 2009 at 09:39:59AM +0200, Frank van Maarseveen wrote:
> On Thu, Jul 30, 2009 at 05:29:57PM -0600, Bruce Guenter wrote:
> > 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.
> 
> [...]
> 
> > 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;
> 
> I think this is the wrong fix, hiding the bug in the writer which should
> use the rotated Width/Height (the patch changed something there too). I'll
> look into it.

No, you are right. initialWidth and initialHeight always need to
track image flipping but not rotation. If the image is rotated an
additional 0.001 degree afterwards then the crash doesn't even occur
because by that time dcraw_image_dimensions() has been called via
ufraw_get_image_dimensions() with the new uf->conf->orientation, taking
care of the issue.

The above is also a partial revert (sort of) of my original patch: the
code has been there before and it does not reintroduce an older writer
bug, something which worried me.


So, please apply.

-- 
Frank

------------------------------------------------------------------------------
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

Reply via email to