元数据提取器库路径访问被拒绝
metadata Extractor library path access denied
我找到了这个可以从图像中提取元数据的 .net 库,下面是他们给出的示例,但是我输入的任何路径都只是提供了对路径的路径访问被拒绝的错误。我是 运行 visual studio 管理员,所以这不应该是问题
static void Main(string[] args)
{
var directories = MetadataExtractor.ImageMetadataReader.ReadMetadata("C:\New folder");
foreach (var directory in directories)
{
foreach (var tag in directory.Tags)
Console.WriteLine($"[{directory.Name}] {tag.Name} = {tag.Description}");
if (directory.HasError)
{
foreach (var error in directory.Errors)
Console.WriteLine($"ERROR: {error}");
}
}
}
你必须设置文件路径,而不是文件夹。我试过这样
C:\New folder\maxresdefault.jpg
它的作品。输出:
[JPEG] Compression Type = Baseline
[JPEG] Data Precision = 8 bits
[JPEG] Image Height = 720 pixels
[JPEG] Image Width = 1280 pixels
[JPEG] Number of Components = 3
[JPEG] Component 1 = Y component: Quantization table 0, Sampling factors 2 horiz/2 vert
[JPEG] Component 2 = Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert
[JPEG] Component 3 = Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert
[JFIF] Version = 1.1
[JFIF] Resolution Units = inch
[JFIF] X Resolution = 96 dots
[JFIF] Y Resolution = 96 dots
[JFIF] Thumbnail Width Pixels = 0
[JFIF] Thumbnail Height Pixels = 0
[Exif IFD0] X Resolution = 96 dots per inch
[Exif IFD0] Y Resolution = 96 dots per inch
[Exif IFD0] Resolution Unit = Inch
[Exif IFD0] Software = paint.net 4.0.19
[File] File Name = maxresdefault.jpg
[File] File Size = 121177 bytes
[File] File Modified Date = Вт май 29 13:45:59 +03:00 2018
我找到了这个可以从图像中提取元数据的 .net 库,下面是他们给出的示例,但是我输入的任何路径都只是提供了对路径的路径访问被拒绝的错误。我是 运行 visual studio 管理员,所以这不应该是问题
static void Main(string[] args)
{
var directories = MetadataExtractor.ImageMetadataReader.ReadMetadata("C:\New folder");
foreach (var directory in directories)
{
foreach (var tag in directory.Tags)
Console.WriteLine($"[{directory.Name}] {tag.Name} = {tag.Description}");
if (directory.HasError)
{
foreach (var error in directory.Errors)
Console.WriteLine($"ERROR: {error}");
}
}
}
你必须设置文件路径,而不是文件夹。我试过这样
C:\New folder\maxresdefault.jpg
它的作品。输出:
[JPEG] Compression Type = Baseline
[JPEG] Data Precision = 8 bits
[JPEG] Image Height = 720 pixels
[JPEG] Image Width = 1280 pixels
[JPEG] Number of Components = 3
[JPEG] Component 1 = Y component: Quantization table 0, Sampling factors 2 horiz/2 vert
[JPEG] Component 2 = Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert
[JPEG] Component 3 = Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert
[JFIF] Version = 1.1
[JFIF] Resolution Units = inch
[JFIF] X Resolution = 96 dots
[JFIF] Y Resolution = 96 dots
[JFIF] Thumbnail Width Pixels = 0
[JFIF] Thumbnail Height Pixels = 0
[Exif IFD0] X Resolution = 96 dots per inch
[Exif IFD0] Y Resolution = 96 dots per inch
[Exif IFD0] Resolution Unit = Inch
[Exif IFD0] Software = paint.net 4.0.19
[File] File Name = maxresdefault.jpg
[File] File Size = 121177 bytes
[File] File Modified Date = Вт май 29 13:45:59 +03:00 2018