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

fetchLongArray() private method

Fetches an array of LONG or SLONG values.
private fetchLongArray ( TiffDirEntry dir, int v ) : bool
dir TiffDirEntry
v int
return bool
        private bool fetchLongArray(TiffDirEntry dir, int[] v)
        {
            if (dir.tdir_count == 1)
            {
                v[0] = (int)dir.tdir_offset;
                return true;
            }

            int cc = dir.tdir_count * sizeof(int);
            byte[] b = new byte[cc];
            int read = fetchData(dir, b);
            if (read != 0)
                Buffer.BlockCopy(b, 0, v, 0, b.Length);

            return (read != 0);
        }
Tiff