2015-10-07 46 views
-1

我想知道如果可以使用Powershell确定TIFF文件是否有多个页面。Powershell确定TIFF文件是否为Multi-TIFF

如果是这样,我该怎么做?

谢谢。

+0

肯定。是的。 –

+0

:),对不起,但我该怎么做? –

+0

[list](http://nugetmusthaves.com/Tag/TIFF)。 –

回答

2

丝毫这样的事情:

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 

$a = [System.Drawing.Bitmap]::FromFile("C:\PS\multipage_tif_example.tif") 

if ($a.GetFrameCount([System.Drawing.Imaging.FrameDimension]::Page) -gt 1) 
{ "Tiff is multi pages" } 
else 
{ "Tiff is single page" }