Class ImageParameters

Class ImageParameters

名称: Aspose.Imaging.FileFormats.Dng.Decoder 收藏: Aspose.Imaging.dll (25.4.0)

DNG 图像参数

[JsonObject(MemberSerialization.OptIn)]
public class ImageParameters

Inheritance

object ImageParameters

继承人

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Properties

CameraManufacturer

接到相机制造商。

public string CameraManufacturer { get; }

财产价值

string

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

ColorsCount

得到颜色。

public int ColorsCount { get; }

财产价值

int

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

Description

获取颜色描述(RGBG、RGBE、GMCY 或 GBTG)。

public string Description { get; }

财产价值

string

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

DngVersion

收到 DNG 版本。

public uint DngVersion { get; }

财产价值

uint

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

Filters

得到比特面具描述在矩阵中的颜色像素的顺序。

public uint Filters { get; }

财产价值

uint

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

IsFoveon

它是Foveon Matrix。

public uint IsFoveon { get; }

财产价值

uint

Model

接收相机模型。

public string Model { get; }

财产价值

string

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

RawCount

获取文件中的 RAW 图像数量(0 意味着文件未被识别)。

public uint RawCount { get; }

财产价值

uint

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

Software

得到软件。

public string Software { get; }

财产价值

string

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

TranslationCfaDng

收到 CFA 摩萨式 DNG 格式的翻译序列。

public string[] TranslationCfaDng { get; }

财产价值

string ( )

Examples

此示例显示如何从文件中加载 DNG 图像,打印其属性,并将其保存到 PNG。

string dir = "c:\\temp\\";
                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "test.dng"))
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Dng.DngImage dngImage = (Aspose.Imaging.FileFormats.Dng.DngImage) image;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.RawData rawData = dngImage.ImgData;
                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageParameters parameters = rawData.ImageDataParameters;
                                                                                                               if (parameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The camera manufacturer:              {0}", parameters.CameraManufacturer);
                                                                                                                   System.Console.WriteLine("The camera model:                     {0}", parameters.Model);
                                                                                                                   System.Console.WriteLine("The colors count:                     {0}", parameters.ColorsCount);
                                                                                                                   System.Console.WriteLine("The colors description:               {0}", parameters.Description);
                                                                                                                   System.Console.WriteLine("The DNG version:                      {0}", parameters.DngVersion);
                                                                                                                   System.Console.WriteLine("The number of RAW images in the file: {0}", parameters.RawCount);
                                                                                                                   System.Console.WriteLine("The software:                         {0}", parameters.Software);
                                                                                                                   System.Console.WriteLine("The order of the color pixels:        {0}", System.Convert.ToString(parameters.Filters, 2));

                                                                                                                   string[] translationCfaDng = parameters.TranslationCfaDng;
                                                                                                                   if (translationCfaDng != null)
                                                                                                                   {
                                                                                                                       System.Console.WriteLine("The translation array for CFA mosaic {0}:", translationCfaDng.Length);
                                                                                                                       foreach (string s in translationCfaDng)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("- {0}", s);
                                                                                                                       }
                                                                                                                   }
                                                                                                               }

                                                                                                               Aspose.Imaging.FileFormats.Dng.Decoder.ImageOtherParameters otherParameters = rawData.ImageOtherParameters;
                                                                                                               if (otherParameters != null)
                                                                                                               {
                                                                                                                   System.Console.WriteLine("The aperture:                         {0}", otherParameters.Aperture);
                                                                                                                   //System.Console.WriteLine("The author:                           {0}", otherParameters.Artist);
                                                                                                                   System.Console.WriteLine("The description:                      {0}", otherParameters.Description);
                                                                                                                   System.Console.WriteLine("The focal length:                     {0}", otherParameters.FocalLength);
                                                                                                                   System.Console.WriteLine("The ISO sensitivity:                  {0}", otherParameters.IsoSpeed);
                                                                                                                   System.Console.WriteLine("The serial number of the image:       {0}", otherParameters.ShotOrder);
                                                                                                                   System.Console.WriteLine("The shutter speed:                    {0}", otherParameters.ShutterSpeed);
                                                                                                                   System.Console.WriteLine("The date of shooting:                 {0}", System.DateTime.FromFileTime(otherParameters.Timestamp));
                                                                                                               }

                                                                                                               // Export to PNG with default options.
                                                                                                               dngImage.Save(dir + "test.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                           }

                                                                                                           // The camera manufacturer:              Leica
                                                                                                           // The camera model:                     M8 Digital Camera
                                                                                                           // The colors count:                     3
                                                                                                           // The colors description:               RGBG
                                                                                                           // The DNG version:                      16777216
                                                                                                           // The number of RAW images in the file: 1
                                                                                                           // The software:                         1.107
                                                                                                           // The order of the color pixels:        10110100101101001011010010110100
                                                                                                           // The aperture:                         0
                                                                                                           // The description:                      
                                                                                                           // The focal length:                     50
                                                                                                           // The ISO sensitivity:                  160
                                                                                                           // The serial number of the image:       0
                                                                                                           // The shutter speed:                    12
                                                                                                           // The date of shooting:                 8/3/2007 3:13:49 AM

XmpData

接收 XMP 数据。

public string XmpData { get; }

财产价值

string

 中文