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

setupShortLong() private method

Setups a directory entry with either a SHORT or LONG type according to the value.
private setupShortLong ( TiffTag tag, TiffDirEntry &dir, int v ) : void
tag TiffTag
dir TiffDirEntry
v int
return void
        private void setupShortLong(TiffTag tag, ref TiffDirEntry dir, int v)
        {
            dir.tdir_tag = tag;
            dir.tdir_count = 1;
            if (v > 0xffffL)
            {
                dir.tdir_type = TiffType.LONG;
                dir.tdir_offset = (uint)v;
            }
            else
            {
                dir.tdir_type = TiffType.SHORT;
                dir.tdir_offset = insertData(TiffType.SHORT, v);
            }
        }
Tiff