Announcement

Collapse
No announcement yet.

Scaling, floating point percentages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Requested Scaling, floating point percentages

    This is not a new feature request, but a feature improvement request. :^)
    First let me say thanks for a wonderful program!

    In the resize dialog: whole number percentages do not give fine enough control, especially when scaling large photos to thumbnails. It would be really nice to be able to enter floating point numbers and not just integers.

    Also, Irfanview seems to suffer from rounding errors, that make me suspect there are internal operations occurring using integers rather than floating point.

    For example, I was resizing some 2592 x 3872 pixel images, using the batch feature. Selecting 457 for the long side (I had both portait and landscape images) resulted in the Irfanview converting them to have the smaller side be 307. If you do the math with enough precision the number should be 306. Entering 306 for the short side resulted in Irfanview converting them to have the larger side be 457. This smells like integer truncation rather than proper rounding.

    These one pixel differences really can make a significant difference, maybe not so much at the size in my example, but in very small thumbs, 1 pixel can distort the proportions detectably.

    Another suspected rounding error: I sometimes get funny results when I crop a magnified image. Sometimes the resulting crop is a pixel off from where the line appeared to be.

    Cheers,

    Eric

    #2
    Originally posted by ericjs View Post
    For example, I was resizing some 2592 x 3872 pixel images, using the batch feature. Selecting 457 for the long side (I had both portait and landscape images) resulted in the Irfanview converting them to have the smaller side be 307. If you do the math with enough precision the number should be 306. Entering 306 for the short side resulted in Irfanview converting them to have the larger side be 457. This smells like integer truncation rather than proper rounding.
    This is funny, considering the Resize dialog gets it right when entering 457 along with aspect ratio selected. The correct value of 306 is returned. So, I suspect some error in batch conversion was made. Command-line also encounters this error.

    These one pixel differences really can make a significant difference, maybe not so much at the size in my example, but in very small thumbs, 1 pixel can distort the proportions detectably.
    You can use the command-line if you are careful with the command order:
    Code:
    i_view32.exe "C:\*.jpg" /resize_short=306 /resize_long=457 /convert="C:\Output\*.jpg"
    Another suspected rounding error: I sometimes get funny results when I crop a magnified image. Sometimes the resulting crop is a pixel off from where the line appeared to be.
    Always do cropping and selection work at 1:1 because there is screen pixel to image pixel conversion imprecision. The custom selection tool's Save Values button helps immensely when working on zoomed images.

    Comment

    Working...
    X