ExifData

JpegImage.ExifData property

Exif veri kapsayıcısını alın veya ayarlayın

public JpegExifData ExifData { get; set; }

Örnekler

Aşağıdaki örnek, bir JPEG görüntüsünden EXIF etiketlerinin nasıl çıkarılacağını gösterir.

[C#]

string dir = "c:\\temp\\";

using (Aspose.Imaging.FileFormats.Jpeg.JpegImage image = (Aspose.Imaging.FileFormats.Jpeg.JpegImage)Image.Load(dir + "original.jpg"))
{
    Aspose.Imaging.Exif.ExifData exifData = image.ExifData;

    System.Console.WriteLine("The general EXIF data");
    System.Console.WriteLine("------------------------------------------");
    if (exifData != null)
    {
        System.Console.WriteLine("The EXIF version: {0}", exifData.ExifVersion);
        System.Console.WriteLine("The camera serial number: {0}", exifData.BodySerialNumber);
        System.Console.WriteLine("The color space: {0}", exifData.ColorSpace);
        System.Console.WriteLine("The brightness: {0}", exifData.BrightnessValue);
        System.Console.WriteLine("The contrast: {0}", exifData.Contrast);
        System.Console.WriteLine("The gamma: {0}", exifData.Gamma);
        System.Console.WriteLine("The sharpness: {0}", exifData.Sharpness);
        System.Console.WriteLine("The aperture: {0}", exifData.ApertureValue);
        System.Console.WriteLine("The exposure mode: {0}", exifData.ExposureMode);
        System.Console.WriteLine("The exposure bias: {0}", exifData.ExposureBiasValue);
        System.Console.WriteLine("The exposure time: {0}", exifData.ExposureTime);
        System.Console.WriteLine("The focal length: {0}", exifData.FocalLength);
        System.Console.WriteLine("The focal plane resolution unit: {0}", exifData.FocalPlaneResolutionUnit);
        System.Console.WriteLine("The lens model: {0}", exifData.LensModel);
        System.Console.WriteLine("The shutter speed: {0}", exifData.ShutterSpeedValue);
    }

    System.Console.WriteLine("The JPEG EXIF data");
    System.Console.WriteLine("------------------------------------------");
    Aspose.Imaging.Exif.JpegExifData jpegExifData = image.ExifData as Aspose.Imaging.Exif.JpegExifData;
    if (jpegExifData != null)
    {
        System.Console.WriteLine("The camera manufacturer: {0}", jpegExifData.Make);
        System.Console.WriteLine("The camera model: {0}", jpegExifData.Model);
        System.Console.WriteLine("The photometric interpretation: {0}", jpegExifData.PhotometricInterpretation);
        System.Console.WriteLine("The artist: {0}", jpegExifData.Artist);
        System.Console.WriteLine("The copyright: {0}", jpegExifData.Copyright);
        System.Console.WriteLine("The image description: {0}", jpegExifData.ImageDescription);
        System.Console.WriteLine("The orientation: {0}", jpegExifData.Orientation);
        System.Console.WriteLine("The software: {0}", jpegExifData.Software);
    }
}

// Çıktı şöyle görünür:
//Genel EXIF verileri
//------------------------------------------
//EXIF sürümü: System.Byte[]
//Kamera seri numarası: 7100536
//Renk uzayı: SRgb
//Parlaklık:
//Kontrast: Normal
//gama:
// Keskinlik: 0
//Açıklık: 4.64(4643856 / 1000000)
//Pozlama modu: Manuel
//Pozlama önyargısı: 0.67(4 / 6)
//Pozlama süresi: 0.01(1 / 160)
//Odak uzaklığı: 145.00(1450 / 10)
//Odak düzlemi çözünürlük birimi: Cm
//Lens modeli: 70.0 - 200.0 mm f/ 4.0
//Enstantane hızı: 7.32(7321928 / 1000000)
//JPEG EXIF verileri
//------------------------------------------
//Kamera üreticisi: NIKON CORPORATION
//Kamera modeli: NIKON D5
//Fotometrik yorum: 0
//Sanatçı: 
//Telif hakkı: 
//Görüntü açıklaması:
//Yönlendirme: Sol Üst
//Yazılım: Adobe Photoshop Camera Raw 9.9(Macintosh)

Ayrıca bakınız