VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

取得 jpg 檔 exif 資訊

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
garfield
Site Admin


註冊時間: 2003-01-30
文章: 2157


第 1 樓

發表發表於: 星期二 七月 14, 2020 11:40 am    文章主題: 取得 jpg 檔 exif 資訊 引言回覆

資料來源: https://www.tek-tips.com/viewthread.cfm?qid=1173924
代碼:

Img = CreateObject("WIA.ImageFile")
Img.LoadFile ("C:WINDOWS\Web\WallpaperBliss.bmp")
s = "Width = " + TRANSFORM(Img.Width) + chr(13) + ;
    "Height = " + TRANSFORM(Img.Height) + chr(13) + ;
    "Depth = " + TRANSFORM(Img.PixelDepth) + chr(13) + ;
    "HorizontalResolution = " + TRANSFORM(Img.HorizontalResolution) + chr(13) + ;
    "VerticalResolution = " + TRANSFORM(Img.VerticalResolution) + chr(13) + ;
    "FrameCount = " + TRANSFORM(Img.FrameCount) + chr(13)
If Img.IsIndexedPixelFormat
    s = s + "Pixel data contains palette indexes" + chr(13)
EndIf
If Img.IsAlphaPixelFormat
    s = s + "Pixel data has alpha information" + chr(13)
EndIf
If Img.IsExtendedPixelFormat
    s = s + "Pixel data has extended color information (16 bit/channel)" + chr(13)
EndIf
If Img.IsAnimated
    s = s + "Image is animated" + chr(13)
EndIf
If Img.Properties.Exists("40091")
            v = Img.Properties("40091").Value
    s = s + "Title = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40092")
            v = Img.Properties("40092").Value
    s = s + "Comment = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40093")
            v = Img.Properties("40093").Value
    s = s + "Author = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40094")
            v = Img.Properties("40094").Value
    s = s + "Keywords = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40095")
            v = Img.Properties("40095").Value
    s = s + "Subject = " + v.String + chr(13)
EndIf
MESSAGEBOX( s)

for i=1 to img.Properties.Count
? img.Properties(i).Name
next
**打算在圖檔裡加上文字註解, 目前還不會 XD
img.SaveFile(圖檔名)

_________________
利用>>搜尋<<的功能會比問的還要快得到答案.
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件
garfield
Site Admin


註冊時間: 2003-01-30
文章: 2157


第 2 樓

發表發表於: 星期二 七月 14, 2020 11:50 am    文章主題: 引言回覆

代碼:

另一種方式

mfile ='d:\mydocument\picture\garfield.jpg'

showfiledata( mfile )

Procedure showfiledata
Lparameters tcPicFullPath
oShell = Createobject("Shell.Application")
oFolder = oShell.Namespace(Justpath(tcPicFullPath))

With oFolder
   For Each cFile In oFolder.Items
      If Upper(cFile.Name) <> Upper(Justfname(tcPicFullPath))
         Loop
      Endif

      For i = 0 To 34
         ?.GetDetailsOf(oFolder.Items, i) + ": " + .GetDetailsOf(cFile, i)
      Endfor
   Endfor
Endwith
Return

_________________
利用>>搜尋<<的功能會比問的還要快得到答案.
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件
lygcw9603



註冊時間: 2011-12-25
文章: 126


第 3 樓

發表發表於: 星期六 八月 01, 2020 9:10 am    文章主題: 引言回覆

學習了
回頂端
檢視會員個人資料 發送私人訊息
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作