Menu

#387 Arithmetic exception in render_live_histogram()

closed-fixed
nobody
None
5
2014-08-27
2014-08-26
No

When for some reason the number of pixels in the cropped part of an image is zero,
a division by zero occurs in render_live_histogram() in render_live_histogram at line 1306. Please insert this at line 1305
if (CropCount == 0) CropCount = 1;

Discussion

  • Niels Kristian Bech Jensen

    The proper fix for this (and bug #388) is to disallow cropping to zero height and width. Such image dimensions does not make sense IMHO.

    Regards,
    Niels Kristian

     
  • Frank Markesteijn

    It happens automatically when working in the lensfun tab, for example when you correct fish eye distortion to get a rectilinear image, if the focal length is short enough the uncorrected angle of view is 180 degrees or more, correcting that would require a canvas of infinite size, ufraw/lensfun limits that to some maximum and then scales it down, resulting in a cross shaped image with a usefull center 0 pixels high and wide, ufraw automatically crops it to that size. In it self there is nothing wrong with this method.

     
  • Niels Kristian Bech Jensen

    OK. I have fixed this and bug #388 in the development code.

    Regards,
    Niels Kristian

     
  • Niels Kristian Bech Jensen

    • Status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB