BitMiracle.LibTiff.Classic.Tiff.fetchRational C# (CSharp) Method

fetchRational() private method

private fetchRational ( TiffDirEntry dir ) : float
dir TiffDirEntry
return float
        private float fetchRational(TiffDirEntry dir)
        {
            byte[] bytes = new byte[sizeof(int) * 2];
            int read = fetchData(dir, bytes);
            if (read != 0)
            {
                int[] l = new int[2];
                l[0] = readInt(bytes, 0);
                l[1] = readInt(bytes, sizeof(int));

                float v;
                bool res = cvtRational(dir, l[0], l[1], out v);
                if (res)
                    return v;
            }

            return 1.0f;
        }
Tiff