ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
123
返回列表 发新帖
楼主: shenjianrong163

[分享] VBA中使用WIA处理本地图像

[复制链接]

TA的精华主题

TA的得分主题

发表于 2022-11-3 22:22 | 显示全部楼层
dd.jpg



  1.                 For KK = 1 To 19
  2.                     With .Properties
  3.                          Debug.Print KK, .Item(KK).Name,
  4.                         
  5.                          Select Case .Item(KK).Type
  6.                              Case 1007, 1006, 1005, 1003, 1002, 1001
  7.                                 Debug.Print .Item(KK).Type, "----", .Item(KK).Value
  8.                           Case Else
  9.                              Debug.Print .Item(KK).Type, .Item(KK).Value.Count
  10.                          End Select
  11.                     End With
  12.                 Next KK
  13.                 Stop
复制代码



2022年10月23日机场交警大队到展馆
1            ImageWidth     1005         ----           1920
2            ImageHeight    1005         ----           2560
3            Orientation    1003         ----           1
4            DateTime       1002         ----          2022:10:23 09:16:54
5            Artist         1002         ----          todayCam
6            ExifDTOrig     1002         ----          2022:10:23 09:16:54
7            ExifDTDigitized              1002         ----          2022:10:23 09:16:54
8            ExifLightSource              1005         ----           0
9            ExifUserComment              1100          10290
10           GpsLatitudeRef               1002         ----          N
11           GpsLatitude    1106          3
12           GpsLongitudeRef              1002         ----          E
13           GpsLongitude   1106          3
14           GpsAltitudeRef               1001         ----           0
15           GpsAltitude    1007         ----           0.1
16           GpsImgDirRef   1002         ----          T
17           GpsImgDir      1007         ----           320.089996335654
18           ChrominanceTable             1102          64
19           LuminanceTable               1102          64



---------------------------------

Tra.rar

23.9 KB, 下载次数: 11

TA的精华主题

TA的得分主题

发表于 2023-5-3 21:31 | 显示全部楼层
Set Img = IP.Apply(Img) 长图片64M,在VB6里测试,这句会提示内存资源不足。惆怅

TA的精华主题

TA的得分主题

发表于 2023-7-2 11:46 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
数码照片的文件高级信息获取 - 深蓝-大海的颜色 - 博客园  https://www.cnblogs.com/deep-blue/p/5109950.html

WIA能获取到照片的高级信息吗?
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(strfile);

日文.
            this.Add(0x10f, "equip make_数字相机的制造商");//表示数字相机的制造商. 在 Exif 标准中, 这个标签是可选的, 但是在DCF中它是必需的.
            this.Add(0x110, "equip model_数字相机的模块代码");//表示数字相机的模块代码. 在 Exif 标准中, 这个标签是可选的, 但在DCF中它也是必需的.
      

            this.Add(0x829a, "exposure time_曝光时间");//曝光时间 (快门速度的倒数). 单位是秒.
            this.Add(0x829d, "f-number_拍照时的光圈");//拍照时的光圈F-number(F-stop).
            this.Add(0x8822, "exposure prog_拍照时相机使用的曝光程序");//拍照时相机使用的曝光程序. '1' 表示手动曝光, '2' 表示正常程序曝光, '3' 表示光圈优先曝光, '4' 表示快门优先曝光, '5' 表示创意程序(慢速程序), '6' 表示动作程序(高速程序), '7'表示 肖像模式, '8' 表示风景模式.

TA的精华主题

TA的得分主题

发表于 2023-7-2 13:29 | 显示全部楼层
(6条消息) 读取图像中的 EXIF 信息(不全,能够读取部分)_exif,版本不一致无法读取_xuan_oscar的博客-CSDN博客  https://blog.csdn.net/xuan_oscar/article/details/2449624

  char   CameraMake    [ 32 ];      //DC 制造商
  char   CameraModel  [ 40 ];      //DC 型号
  char   DateTime      [ 20 ];      //JPG 文件日期
  char   DateTimeDigitized [ 20 ];  //JPG 文件被其它软件修改日期
  int    Height , Width ;          // 图像高度、宽度
  int    Orientation ;            // 拍摄方向,例如相机向左手方向旋转后拍摄的
  int    IsColor ;                //
  int    Process ;                // 被处理
  int    FlashUsed ;              // 是否使用闪光灯
  float FocalLength ;            // 焦距
  float ExposureTime ;           // 曝光时间(快门速度)
  float ApertureFNumber ;        // 光圈数
  float Distance ;               // 拍摄物体距离
  float CCDWidth ;                //CCD 大小
  float ExposureBias ;           // 曝光补偿
  int    Whitebalance ;           // 白平衡
  int    MeteringMode ;           // 测光模式
  int    ExposureProgram ;        // 曝光
  int    ISOequivalent ;          //ISO
  int    CompressionLevel ;       // 压缩
————————————————


没有用水印相机,手机自带相机拍摄结果。


1            F:\6.jpg      ImageWidth     3468
2            F:\6.jpg      ImageHeight    4624
3            F:\6.jpg      EquipMake     OPPO
4            F:\6.jpg      EquipModel    OPPO Reno5 K 5G
5            F:\6.jpg      Orientation    1
6            F:\6.jpg      XResolution    72
7            F:\6.jpg      YResolution    72
8            F:\6.jpg      ResolutionUnit               2
9            F:\6.jpg      DateTime      2023:06:27 10:17:38
10           F:\6.jpg      YCbCrPositioning             1
11           F:\6.jpg      GpsLatitudeRef              N
12           F:\6.jpg      GpsLatitude   Count=         3
13           F:\6.jpg      ExifExposureTime             3.03030303030303E-02
14           F:\6.jpg      ExifFNumber    1.7
15           F:\6.jpg      ExifExposureProg             2
16           F:\6.jpg      ExifISOSpeed   311
17           F:\6.jpg      ExifVer       Count=         4
18           F:\6.jpg      ExifDTOrig    2023:06:27 10:17:38
19           F:\6.jpg      ExifDTDigitized             2023:06:27 10:17:38
20           F:\6.jpg      36881         +08:00
21           F:\6.jpg      ExifCompConfig              Count=         4
22           F:\6.jpg      ExifShutterSpeed             5.058
23           F:\6.jpg      ExifAperture   1.53
24           F:\6.jpg      ExifBrightness               .68
25           F:\6.jpg      ExifExposureBias             0
26           F:\6.jpg      ExifMaxAperture              1.53
27           F:\6.jpg      ExifMeteringMode             2
28           F:\6.jpg      ExifFlash      16
29           F:\6.jpg      ExifFocalLength              4.73
30           F:\6.jpg      ExifMakerNote Count=         153
31           F:\6.jpg      ExifUserComment             Count=         8
32           F:\6.jpg      ExifDTSubsec  671
33           F:\6.jpg      ExifDTOrigSS  671
34           F:\6.jpg      ExifDTDigSS   671
35           F:\6.jpg      ExifFPXVer    Count=         4
36           F:\6.jpg      ExifColorSpace               1
37           F:\6.jpg      ExifPixXDim    0
38           F:\6.jpg      ExifPixYDim    0
39           F:\6.jpg      ExifSensingMethod            0
40           F:\6.jpg      ExifSceneType  1
41           F:\6.jpg      41986          0
42           F:\6.jpg      41987          0
43           F:\6.jpg      41989          0
44           F:\6.jpg      41990          0
45           F:\6.jpg      GpsLongitudeRef             E
46           F:\6.jpg      GpsLongitude  Count=         3
47           F:\6.jpg      GpsAltitudeRef               0
48           F:\6.jpg      GpsAltitude    0
49           F:\6.jpg      GpsGpsTime    Count=         3
50           F:\6.jpg      29            2023:06:27
51           F:\6.jpg      ChrominanceTable            Count=         64
52           F:\6.jpg      LuminanceTable              Count=         64
53           F:\6.jpg      ICCProfile    Count=         548
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-5-21 00:06 , Processed in 0.033898 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表