Notice: Trying to access array offset on value of type bool in /srv/http/flyspray/scripts/details.php on line 649 FS#3179 : TIFFReadRGBAImageOriented Premultiplication rounding error

Graphic Utility Library

  • Status New
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Backend / Core
  • Assigned To No-one
  • Operating System Win32
  • Severity Low
  • Priority Very Low
  • Reported Version 1.0
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Graphic Utility Library
Opened by Michael Pfeuti - 2012-08-30

FS#3179 - TIFFReadRGBAImageOriented Premultiplication rounding error

TIFFReadRGBAImageOriented executes an alpha premultiplication even when the alpha value is stored as EXTRASAMPLE_UNASSALPHA. This leads to rounding errors. example: (correct mathematical rounding) gt: 226 and alpha 0.5 -> 127 read the premultiplied value: 226*127/255 = 112.56 -> 113 converting to nonpremultiplied value: 113*255/127 = 226.89 -> 227 gt: 225 and alpha 0.5 -> 127 read the premultiplied value: 225*127/255 = 112.06 -> 112 converting to nonpremultiplied value: 112*255/127 = 224.88 -> 225 so we have a difference of 1 or 0 between the ground truth and the read value after undoing the premultiplication. (incorrect mathematical rounding) gt: 226 and alpha 0.5 -> 127 read the premultiplied value: 226*127/255 = 112.56 -> 112 converting to nonpremultiplied value: 112*255/127 = 224.88 -> 224 so incorrect mathematical rounding leading to much worse results. Consider using a different way to read the tiff image (for instance ReadEncodedStrip).

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing