本文整理汇总了C#中BitMiracle.LibTiff.Classic.Tiff.DefaultTileSize方法的典型用法代码示例。如果您正苦于以下问题:C# Tiff.DefaultTileSize方法的具体用法?C# Tiff.DefaultTileSize怎么用?C# Tiff.DefaultTileSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitMiracle.LibTiff.Classic.Tiff
的用法示例。
在下文中一共展示了Tiff.DefaultTileSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Copy
//.........这里部分代码省略.........
* the command line arguments (-tiles, -strips) and the
* structure of the input image.
*/
if (m_outtiled == -1)
{
if (inImage.IsTiled())
m_outtiled = 1;
else
m_outtiled = 0;
}
if (m_outtiled != 0)
{
/*
* Setup output file's tile width&height. If either
* is not specified, use either the value from the
* input image or, if nothing is defined, use the
* library default.
*/
if (m_tilewidth == -1)
{
result = inImage.GetFieldDefaulted(TiffTag.TILEWIDTH);
if (result != null)
m_tilewidth = result[0].ToInt();
}
if (m_tilelength == -1)
{
result = inImage.GetFieldDefaulted(TiffTag.TILELENGTH);
if (result != null)
m_tilelength = result[0].ToInt();
}
outImage.DefaultTileSize(ref m_tilewidth, ref m_tilelength);
outImage.SetField(TiffTag.TILEWIDTH, m_tilewidth);
outImage.SetField(TiffTag.TILELENGTH, m_tilelength);
}
else
{
/*
* RowsPerStrip is left unspecified: use either the
* value from the input image or, if nothing is defined,
* use the library default.
*/
if (m_rowsperstrip == 0)
{
result = inImage.GetField(TiffTag.ROWSPERSTRIP);
if (result == null)
m_rowsperstrip = outImage.DefaultStripSize(m_rowsperstrip);
else
m_rowsperstrip = result[0].ToInt();
if (m_rowsperstrip > length && m_rowsperstrip != -1)
m_rowsperstrip = length;
}
else if (m_rowsperstrip == -1)
m_rowsperstrip = length;
outImage.SetField(TiffTag.ROWSPERSTRIP, m_rowsperstrip);
}
if (m_config != PlanarConfig.UNKNOWN)
outImage.SetField(TiffTag.PLANARCONFIG, m_config);
else
{
result = inImage.GetField(TiffTag.PLANARCONFIG);