Skip to content

Fix: Internal storage of rational tags changed from float to native rational values.

Su Laus requested to merge Su_Laus/libtiff:SetGet-RATIONAL_directly_Dev into master

Solves issue #226 (Impossibility to set the resolution with a rational)

The internal storage of RATIONAL tag values has been changed from float values to real rational value pairs.

  • Increasing the accuracy (precision).
  • Additional interface to directly write / read rational value pairs. This gives the user the possibility to increase / determine the accuracy of rational values.
    • TIFFSetFieldRational(),
    • TIFFGetFieldRational()
      This routines expect as va_list: Numerator , Denominator as uint_32 (or int_32 for signed rationals).
  • The existing interface (with float) is retained.
  • Conversion programmes are now available externally:
    • DoubleToRational(),
    • DoubleToSrational()

Test Program: Rational_SetGetDirect_Test.c

Merge request reports