Hallo

Another try. I added some debug output to the source. If I have exposure 
blinking enabled and try to rotate counter clockwise 
(one click - so one degree), I get the following output:

X. Scale [0.262622], img-w [619], rot-w [2357]  Y. Scale [0.263068], img-h 
[926], rot-h [3520]
X: [617], CropX2: [2347] Y: [923], CropY2: [3505]
X. Scale [0.397971], img-w [1412], rot-w [3548]  Y. Scale [0.176397], img-h 
[423], rot-h [2398]
X: [935], CropX2: [2347] Y: [423], CropY2: [3505]

The corresponding function looks like this:

void ufraw_get_scaled_crop(ufraw_data *uf, UFRectangle *crop)
{
    ufraw_image_data *img = ufraw_get_image(uf, ufraw_transform_phase, FALSE);

    float scale_x = ((float)img->width) / uf->rotatedWidth;
    float scale_y = ((float)img->height) / uf->rotatedHeight;
    printf("X. Scale [%f], img-w [%d], rot-w [%d]  ", scale_x, img->width, 
uf->rotatedWidth);
    printf("Y. Scale [%f], img-h [%d], rot-h [%d]\n", scale_y, img->height, 
uf->rotatedHeight);
    crop->x = MAX(floor(uf->conf->CropX1 * scale_x), 0);
    int x2 = MIN(ceil(uf->conf->CropX2 * scale_x), img->width);
    crop->width = x2 - crop->x;
    crop->y = MAX(floor(uf->conf->CropY1 * scale_y), 0);
    int y2 = MIN(ceil(uf->conf->CropY2 * scale_y), img->height);
    crop->height = y2 - crop->y;

    printf("X: [%d], CropX2: [%d] ", x2, uf->conf->CropX2);
    printf("Y: [%d], CropY2: [%d]\n", y2, uf->conf->CropY2);
}

Why on earth does the values for scale_x and scale_y change that drastic?

Martin

Am Freitag, 24. September 2010 schrieb Martin (Lists):
> Main problem: I can not reproduce this error on other computers
> (neither windows nor my second fedora box). So may be something in
> my gtk settings is messed up.
> 
> Martin
> 
> Martin (Lists) schrieb:
> > Something new from my crashes: As soon as I have enabled the
> > overExposure setting or the unterExposure setting, ufraw crashes
> > _after_ next startup on rotating the picture counter clockwise.
> > Disabling the exposure marks fixes this issue.
> > 
> > Anyone else seeing this?
> > 
> > Martin
> > 

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
ufraw-devel mailing list
ufraw-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-devel

Reply via email to