BitMiracle.LibTiff.Classic.TiffCodec.DefStripSize C# (CSharp) Метод

DefStripSize() публичный Метод

Calculates and/or constrains a strip size.
public DefStripSize ( int size ) : int
size int The proposed strip size (may be zero or negative).
Результат int
        public virtual int DefStripSize(int size)
        {
            if (size < 1)
            {
                // If RowsPerStrip is unspecified, try to break the image up into strips that are
                // approximately STRIP_SIZE_DEFAULT bytes long.
                int scanline = m_tif.ScanlineSize();
                size = Tiff.STRIP_SIZE_DEFAULT / (scanline == 0 ? 1 : scanline);
                if (size == 0)
                {
                    // very wide images
                    size = 1;
                }
            }

            return size;
        }