有一個psd檔案,有幾個圖層,每個圖層置入了 一張相片, 如何使用VB 來獲取這些圖片的大小(就是長 和款)?
如果 圖片比 背景大,如圖片700*700, 而背景只有300*300, 圖片只顯示右上角部分,,如何用VB讀取出來?
求大神支招,無需完整代碼,,,關鍵函式或者 代碼即可,謝過謝過
uj5u.com熱心網友回復:
我先用ps生成了檔案c:\new\tmp.psd,背景400x300,兩層,上層622x242然后使用ImageMagick的命令列工具identify.exe:
C:\Program Files\ImageMagick-6.6.9-Q16>identify c:\new\tmp.psd
c:\new\tmp.psd[0] PSD 400x300 400x300+0+0 8-bit DirectClass 285KB 0.016u 0:00.016
c:\new\tmp.psd[1] PSD 400x300 400x300+0+0 8-bit DirectClass 285KB 0.016u 0:00.016
c:\new\tmp.psd[2] PSD 622x242 622x242-56+10 8-bit DirectClass 285KB 0.016u 0:00.031
在VB中使用
Shell “cmd /c ""C:\Program Files\ImageMagick-6.6.9-Q16\identify“” c:\new\tmp.psd >d:\psdinfo.txt“,vbHide
‘然后讀檔案d:\psdinfo.txt的內容
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/82868.html
標籤:多媒體
上一篇:求各位大神幫忙!
下一篇:VB腳本求助
