Rational means that it's a fraction: value[0]/value[1] Many image and video file formats store things that must be an exact fraction as the fraction rather than the float approximation. You can retrieve it as a float with get_float_attribute(), but for many values it will be an approximation (for the same reason that 1/3 is not exactly representable as a decimal in base 10).
In OIIO, the TypeDesc corresponding to this is TypeRational, which is an alias for TypeDesc(TypeDesc::INT, TypeDesc::VEC2, TypeDesc::RATIONAL), meaning that it's stored as an int2 but with a hint that it represents a rational number, not two separate integer values. > On Sep 25, 2020, at 8:50 AM, Ingmania <[email protected]> wrote: > > The plugin for GIFs or Movies defines a FramesPerSecond attribute of type > > int[2] (rational) > > What does that mean? One possible interpretation I came up with is that the > second item in the array holds the fractional part. Is that so? If yes, why > not just use a float instead? > > -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
