Const Width = "640"
Const Height = "480"
Const Font = "meiryo.ttc"
Set FileSystem = Createobject("Scripting.FileSystemObject")
Set Shell = CreateObject("WScript.Shell")
Set ImageMagick = CreateObject("ImageMagickObject.MagickImage.1")
Messages = ImageMagick.Convert( _
"-font", FileSystem.BuildPath(Shell.SpecialFolders("Fonts"), Font), _
"-pointsize", "60", _
"label:@" & FileSystem.GetBaseName(WScript.ScriptFullName) & ".txt", _
"nul.bmp")
If Width / Split(Messages, ",")(0) =< Height / Split(Messages, ",")(1) Then
PointSize = Fix(Width / Split(Messages, ",")(0) * 60)
Else
PointSize = Fix(Height / Split(Messages, ",")(1) * 60)
End If
ImageMagick.Convert _
"-size", Width & "x" & Height, _
"canvas:none", _
"-fill", "white", _
"-draw", "rectangle 0,0," & Width - 1 & "," & Height - 1, _
"-font", FileSystem.BuildPath(Shell.SpecialFolders("Fonts"), Font), _
"-pointsize", PointSize, _
"-fill", "black", _
"-gravity", "center", _
"-annotate", "0", "@" & FileSystem.GetBaseName(WScript.ScriptFullName) & ".txt", _
FileSystem.GetBaseName(WScript.ScriptFullName) & ".bmp"
ImageMagick
■ このスレッドは過去ログ倉庫に格納されています
返信 [1]
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 「なぜ実家に1円も入れないの?」40代子ども部屋おじさんの答えは?実家暮らし中年が20年で2倍に 批判の裏にある「最後のユートピア」論 [七波羅探題★]
- 人口減少で「戦略庁」創設 自民、政府へ来月提言 [首都圏の虎★]
- 【速報】織田翔希、メジャー挑戦に暗雲… MLB労使交渉 国際アマ選手契約も凍結へ ロックアウト突入の可能性大でマイナー契約も不可に [冬月記者★]
- 【高市首相】APECでトランプ氏に背後から手を添えるも“無視”に「恥ずかしい」の声…識者も驚く“ぼっち外交”のレベル ★2 [ぐれ★]
- 【参政党】国政選挙の立候補者「帰化歴」開示へ法案 二重国籍者の出馬禁止 [蚤の市★]
- 「孫が欲しいって言ったじゃん」41歳・実家暮らし非正規雇用の女性が妊娠 70代母「どうやって育てるの?」 [お断り★]