|
图片_取照片拍摄日期 | 逻辑型 | |
|
文件名 | 文本型 | | | |
拍摄时间 | 文本型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 |
gdiplusStartupInput | GdiplusStartupInput | | |
gdiplusToken | 整数型 | | |
nSize | 整数型 | | |
buffer | 字节集 | | |
pImage | 整数型 | | |
hStatus | 整数型 | | |
gdiplusStartupInput.GdiplusVersion = 1
hStatus =
GdiplusStartup (gdiplusToken, gdiplusStartupInput, 0
)
如果真 (hStatus ≠ 0
)
返回 (假)hStatus = GdipLoadImageFromFile (编码_Ansi到Unicode (文件名, ), pImage)
如果真 (hStatus = 0
)
hStatus =
GdipGetPropertyItemSize (pImage,
#PropertyTagExifDTOrig, nSize
)
如果真 (hStatus = 0
)

buffer =
取空白字节集 (nSize
)
GdipGetPropertyItem (pImage,
#PropertyTagExifDTOrig, nSize, buffer
)

拍摄时间 = 取字节集 数 据
(buffer,
#文本型, 17
)
GdipDisposeImage (pImage)GdiplusShutdown (gdiplusToken)返回 (nSize ≠ 0
)