我正在编写一个简单的 VB6 程序来更改所选文件的名称。我想显示图片的小图像(大约缩放到 2"X3")。为了避免图像失真(我必须使用 VB 图片图像),我想改变显示的图片框的高度和宽度以适应图片的大小。为此,我想提取文件的高度和宽度,然后将其缩小并调整图片框的大小
答案1
exif 文件中的哪些字段提供图像高度/宽度信息?
以下是Exif 2.3 标准(PDF 链接):
+------------+------------+--------+-------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------+
| Tag (hex) | Tag (dec) | IFD | Key | Type | Tag description |
+------------+------------+--------+-------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------+
| 0x0100 | 256 | Image | Exif.Image.ImageWidth | Long | The number of columns of image data, equal to the number of pixels per row. In JPEG compressed data a JPEG marker is used instead of this tag. |
| 0x0101 | 257 | Image | Exif.Image.ImageLength | Long | The number of rows of image data. In JPEG compressed data a JPEG marker is used instead of this tag. |
+------------+------------+--------+-------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------+