コメント |
Tiff にカタログされているデータを、ページ毎に出力し、
その各々の画像から切り抜きデータを作成します
↓ダウンロード
http://www.imagemagick.org/script/index.php
( ImageMagick-6.5.0-1-Q8-windows-static.exe を使用しました )
インストールすると以下のようなダイアログが出るので、
COM をインストールします。
http://lightbox.cocolog-nifty.com/photos/app5/imagemagic.png
※ コマンドラインで使用しないのであれば、2番目のチェックは必要ありません
以下が抽出用のソースコードです。
[[tiff_crop.vbs]]
@DIV
Set fso = CreateObject("Scripting.FileSystemObject")
Set img = CreateObject("ImageMagickObject.MagickImage.1")
Call img.Convert("test.tif", "split.bmp")
Set objFolder = Fso.GetFolder( ".\" )
Set objFiles = objFolder.Files
For each objFile in objFiles
strFileName = objFile.Name
if Left( strFileName, 6 ) = "split-" then
Call img.Convert( _
strFileName, _
"-crop", _
"100x100+100+100", _
"+repage", _
Replace( strFileName, "-", "" ) & ".png" )
end if
Next
Wscript.Echo "処理が終了しました"
@END
[[100x100+100+100]] : 幅x高さ+x座標+y座標 です。( 左上原点 )
※ PNG で出力すると crop が動作しませんので、確実な BMP を使用しています
※ TIFF から直接もだめでした。バグがあるようです。
@HTML
<a href="http://lightbox.matrix.jp/ginpro/patio.cgi?mode=view2&f=288&no=1&type=ref&opt=text-align:left;margin-left:5px;&xml=y" target="_blank">バッチファイル</a>
<br><br>
<a href="http://lightbox.matrix.jp/ginpro/patio.cgi?mode=view2&f=288&no=3&type=ref&opt=text-align:left;margin-left:5px;&xml=y" target="_blank">C++</a> <a href="http://lightbox.matrix.jp/ginpro/patio.cgi?mode=view2&f=288&no=4&type=ref&opt=text-align:left;margin-left:5px;&xml=y" target="_blank">C++(2)</a>
<br><br>
<a href="http://lightbox.matrix.jp/ginpro/patio.cgi?mode=view2&f=288&no=2&type=ref&opt=text-align:left;margin-left:5px;&xml=y" target="_blank">PHP</a>
@HEND
|