If the image is larger than the background, such as 700 * 700 images, and the background is only 300 * 300, pictures show only the upper part, and how to use VB to read out?
O great spirit action without complete code,,, the key function or code, thanked thanked
CodePudding user response:
I use ps first generates the file c: \ new \ TMP PSD, background 400 x300, two layer, the upper 622 x242Then use the ImageMagick command-line tool to identify. Exe:
C: \ Program Files \ ImageMagick - 6.6.9 - Q16 & gt; the identify c: \ new \ TMP PSD
C: \ new \ TMP PSD [0] 400 x300 400 x300 PSD + 0 + 0 8-bit DirectClass 285 KB 0.016 u 0:00. 016
C: \ new \ TMP PSD [1] PSD 400 x300 400 x300 + 0 + 0 8-bit DirectClass 285 KB 0.016 u 0:00. 016
C: \ new \ TMP PSD [2] PSD x242 x242 622-56 + 10 622 8-bit DirectClass 285 KB 0.016 u 0:00. 031
In VB use
Shell "CMD/c" "c: \ Program Files \ ImageMagick - 6.6.9 - Q16 \ the identify" "c: \ new \ TMP PSD & gt; D: \ psdinfo. TXT ", vbHide
'and then read the file d: \ psdinfo TXT content