Class GifOptions

Class GifOptions

Tên không gian: Aspose.Imaging.ImageOptions Tổng hợp: Aspose.Imaging.dll (25.4.0)

API for Graphical Interchange Format (GIF) raster image file creation cung cấpphát triển các tùy chọn toàn diện để tạo hình ảnh GIF với độ chính xácvới các tính năng để thiết lập màu nền, bảng màu, độ phân giải,loại liên kết, màu sắc minh bạch, container metadata XMP, và hình ảnhnén, API này đảm bảo tính linh hoạt và hiệu quả trong việc tạo ra tối ưu hóavà GIF hấp dẫn trực quan được điều chỉnh theo yêu cầu ứng dụng cụ thể.

[JsonObject(MemberSerialization.OptIn)]
public class GifOptions : ImageOptionsBase, IDisposable, IHasXmpData, IHasMetadata, ICloneable

Inheritance

object DisposableObject ImageOptionsBase GifOptions

Implements

IDisposable , IHasXmpData , IHasMetadata , ICloneable

Thành viên thừa kế

ImageOptionsBase.Clone() , ImageOptionsBase.ReleaseManagedResources() , ImageOptionsBase.KeepMetadata , ImageOptionsBase.XmpData , ImageOptionsBase.Source , ImageOptionsBase.Palette , ImageOptionsBase.ResolutionSettings , ImageOptionsBase.VectorRasterizationOptions , ImageOptionsBase.BufferSizeHint , ImageOptionsBase.MultiPageOptions , ImageOptionsBase.FullFrame , ImageOptionsBase.ProgressEventHandler , DisposableObject.Dispose() , DisposableObject.ReleaseManagedResources() , DisposableObject.ReleaseUnmanagedResources() , DisposableObject.VerifyNotDisposed() , DisposableObject.Disposed , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Ví dụ này cho thấy việc sử dụng các lớp khác nhau từ SaveOptions Namespace cho mục đích xuất khẩu. Một hình ảnh kiểu Gif được tải lên trong một ví dụ của Hình ảnh và sau đó xuất sang nhiều định dạng.

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

                                                                                                                                                                                                                    //Load an existing image (of type Gif) in an instance of Image class
                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
                                                                                                                                                                                                                    {
                                                                                                                                                                                                                        //Export to BMP file format using the default options
                                                                                                                                                                                                                        image.Save(dir + "output.bmp", new Aspose.Imaging.ImageOptions.BmpOptions());

                                                                                                                                                                                                                        //Export to JPEG file format using the default options
                                                                                                                                                                                                                        image.Save(dir + "output.jpg", new Aspose.Imaging.ImageOptions.JpegOptions());

                                                                                                                                                                                                                        //Export to PNG file format using the default options
                                                                                                                                                                                                                        image.Save(dir + "output.png", new Aspose.Imaging.ImageOptions.PngOptions());

                                                                                                                                                                                                                        //Export to TIFF file format using the default options
                                                                                                                                                                                                                        image.Save(dir + "output.tif", new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default));
                                                                                                                                                                                                                    }

Ví dụ sau đây cho thấy cách chuyển đổi hình ảnh vector đa trang sang định dạng GIF nói chung mà không đề cập đến một loại hình hình cụ thể.

string dir = "C:\\aspose.imaging\\net\\misc\\ImagingReleaseQATester\\Tests\\testdata\\2548";
                                                                                                                                                           string inputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr");
                                                                                                                                                           string outputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr.gif");

                                                                                                                                                           Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.GifOptions();

                                                                                                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
                                                                                                                                                           {
                                                                                                                                                               exportOptions.MultiPageOptions = null;

                                                                                                                                                               // Export only first two pages. These pages will be presented as animated frames in the output GIF.
                                                                                                                                                               Aspose.Imaging.IMultipageImage multipageImage = image as Aspose.Imaging.IMultipageImage;
                                                                                                                                                               if (multipageImage != null && (multipageImage.Pages != null && multipageImage.PageCount > 2))
                                                                                                                                                               {
                                                                                                                                                                   exportOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.MultiPageOptions(new Aspose.Imaging.IntRange(0, 2));
                                                                                                                                                               }

                                                                                                                                                               if (image is Aspose.Imaging.VectorImage)
                                                                                                                                                               {
                                                                                                                                                                   exportOptions.VectorRasterizationOptions = (Aspose.Imaging.ImageOptions.VectorRasterizationOptions)image.GetDefaultOptions(new object[] { Aspose.Imaging.Color.White, image.Width, image.Height });
                                                                                                                                                                   exportOptions.VectorRasterizationOptions.TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel;
                                                                                                                                                                   exportOptions.VectorRasterizationOptions.SmoothingMode = Aspose.Imaging.SmoothingMode.None;
                                                                                                                                                               }

                                                                                                                                                               image.Save(outputFilePath, exportOptions);
                                                                                                                                                           }

Ví dụ này cho thấy làm thế nào để tải thông tin Pixel trong Array of Type Color, thao túng array và đặt nó trở lại hình ảnh. Để thực hiện các hoạt động này, ví dụ đó tạo ra một tập tin Image mới (trong định dạng GIF) uisng MemoryStream đối tượng.

//Create an instance of MemoryStream
                                                                                                                                                                                                                                                         using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
                                                                                                                                                                                                                                                         {
                                                                                                                                                                                                                                                             //Create an instance of GifOptions and set its various properties including the Source property
                                                                                                                                                                                                                                                             Aspose.Imaging.ImageOptions.GifOptions gifOptions = new Aspose.Imaging.ImageOptions.GifOptions();
                                                                                                                                                                                                                                                             gifOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                             //Create an instance of Image
                                                                                                                                                                                                                                                             using (Aspose.Imaging.RasterImage image = (Aspose.Imaging.RasterImage)Aspose.Imaging.Image.Create(gifOptions, 500, 500))
                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                 //Get the pixels of image by specifying the area as image boundary
                                                                                                                                                                                                                                                                 Aspose.Imaging.Color[] pixels = image.LoadPixels(image.Bounds);

                                                                                                                                                                                                                                                                 //Loop over the Array and sets color of alrenative indexed pixel
                                                                                                                                                                                                                                                                 for (int index = 0; index < pixels.Length; index++)
                                                                                                                                                                                                                                                                 {
                                                                                                                                                                                                                                                                     if (index % 2 == 0)
                                                                                                                                                                                                                                                                     {
                                                                                                                                                                                                                                                                         //Set the indexed pixel color to yellow
                                                                                                                                                                                                                                                                         pixels[index] = Aspose.Imaging.Color.Yellow;
                                                                                                                                                                                                                                                                     }
                                                                                                                                                                                                                                                                     else
                                                                                                                                                                                                                                                                     {
                                                                                                                                                                                                                                                                         //Set the indexed pixel color to blue
                                                                                                                                                                                                                                                                         pixels[index] = Aspose.Imaging.Color.Blue;
                                                                                                                                                                                                                                                                     }
                                                                                                                                                                                                                                                                 }

                                                                                                                                                                                                                                                                 //Apply the pixel changes to the image
                                                                                                                                                                                                                                                                 image.SavePixels(image.Bounds, pixels);

                                                                                                                                                                                                                                                                 // save all changes.
                                                                                                                                                                                                                                                                 image.Save();
                                                                                                                                                                                                                                                             }

                                                                                                                                                                                                                                                             // Write MemoryStream to File
                                                                                                                                                                                                                                                             using (System.IO.FileStream fileStream = new System.IO.FileStream(@"C:\temp\output.gif", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                 stream.WriteTo(fileStream);
                                                                                                                                                                                                                                                             }   
                                                                                                                                                                                                                                                         }

Constructors

GifOptions()

Bắt đầu một trường hợp mới của lớp Aspose.Imaging.ImageOptions.GifOption.

[JsonConstructor]
public GifOptions()

GifOptions(GifOptions)

Bắt đầu một trường hợp mới của lớp Aspose.Imaging.ImageOptions.GifOption.

public GifOptions(GifOptions gifOptions)

Parameters

gifOptions GifOptions

Các tùy chọn GIF

Properties

BackgroundColor

Nhận hoặc đặt màu nền.

[JsonProperty]
public Color BackgroundColor { get; set; }

Giá trị bất động sản

Color

BackgroundColorIndex

Nhận hoặc đặt GIF background color index.

public byte BackgroundColorIndex { get; set; }

Giá trị bất động sản

byte

ColorResolution

Nhận hoặc đặt độ phân giải màu GIF.

public byte ColorResolution { get; set; }

Giá trị bất động sản

byte

Examples

Ví dụ này cho thấy cách lưu một hình ảnh BMP vào định dạng GIF bằng cách sử dụng các tùy chọn khác nhau.

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

                                                                                          using (Aspose.Imaging.Image bmpImage = new Aspose.Imaging.FileFormats.Bmp.BmpImage(1000, 1000))
                                                                                          {
                                                                                              // Fill the entire image with the blue-yellow gradient.
                                                                                              Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                      new Aspose.Imaging.Point(0, 0),
                                                                                                      new Aspose.Imaging.Point(bmpImage.Width, bmpImage.Height),
                                                                                                      Aspose.Imaging.Color.Blue,
                                                                                                      Aspose.Imaging.Color.Yellow);

                                                                                              Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(bmpImage);
                                                                                              graphics.FillRectangle(gradientBrush, bmpImage.Bounds);

                                                                                              Aspose.Imaging.ImageOptions.GifOptions saveOptions = new Aspose.Imaging.ImageOptions.GifOptions();

                                                                                              // The number of bits required to store a color, minus 1.
                                                                                              saveOptions.ColorResolution = 7;

                                                                                              // Palette correction means that whenever image is exported to GIF the source image colors will be analyzed
                                                                                              // in order to build the best matching palette (in case image Palette does not exist or not specified in the options)
                                                                                              saveOptions.DoPaletteCorrection = true;

                                                                                              // Load a GIF image in a progressive way.
                                                                                              // An interlaced GIF doesn't display its scanlines linearly from top to bottom, but instead reorders it
                                                                                              // so the content of the GIF becomes clear even before it finishes loading.
                                                                                              saveOptions.Interlaced = true;

                                                                                              // Save as a lossless GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossless GIF: {0} bytes.", stream.Length);
                                                                                              }

                                                                                              // Set the maximum allowed pixel difference. If greater than zero, lossy compression will be used.
                                                                                              // The recommended value for optimal lossy compression is 80. 30 is very light compression, 200 is heavy.
                                                                                              saveOptions.MaxDiff = 80;

                                                                                              // Save as a lossy GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.lossy.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossy GIF: {0} bytes.", stream.Length);
                                                                                              }
                                                                                          }

                                                                                          //The output may look like this:
                                                                                          //The size of the lossless GIF: 212816 bytes.
                                                                                          //The size of the lossy GIF: 89726 bytes.

Remarks

Độ phân giải màu - Số bit mỗi màu cơ bản có sẵnvới hình ảnh ban đầu, minus 1. giá trị này đại diện cho kích thước củatoàn bộ palette từ đó các màu sắc trong đồ họa làđược chọn, không phải số lượng màu thực sự được sử dụng trong đồ họa.Ví dụ, nếu giá trị trong lĩnh vực này là 3, thì palette củahình ảnh ban đầu có 4 bit mỗi màu cơ bản có sẵn để tạohình ảnh. giá trị này nên được thiết lập để chỉ ra sự giàu có củabảng ban đầu, ngay cả khi không phải tất cả các màu từ toàn bộPalette có sẵn trên máy nguồn.

DoPaletteCorrection

Nhận hoặc đặt một giá trị cho thấy liệu sửa chữa palette có được áp dụng hay không.

public bool DoPaletteCorrection { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ này cho thấy cách lưu một hình ảnh BMP vào định dạng GIF bằng cách sử dụng các tùy chọn khác nhau.

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

                                                                                          using (Aspose.Imaging.Image bmpImage = new Aspose.Imaging.FileFormats.Bmp.BmpImage(1000, 1000))
                                                                                          {
                                                                                              // Fill the entire image with the blue-yellow gradient.
                                                                                              Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                      new Aspose.Imaging.Point(0, 0),
                                                                                                      new Aspose.Imaging.Point(bmpImage.Width, bmpImage.Height),
                                                                                                      Aspose.Imaging.Color.Blue,
                                                                                                      Aspose.Imaging.Color.Yellow);

                                                                                              Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(bmpImage);
                                                                                              graphics.FillRectangle(gradientBrush, bmpImage.Bounds);

                                                                                              Aspose.Imaging.ImageOptions.GifOptions saveOptions = new Aspose.Imaging.ImageOptions.GifOptions();

                                                                                              // The number of bits required to store a color, minus 1.
                                                                                              saveOptions.ColorResolution = 7;

                                                                                              // Palette correction means that whenever image is exported to GIF the source image colors will be analyzed
                                                                                              // in order to build the best matching palette (in case image Palette does not exist or not specified in the options)
                                                                                              saveOptions.DoPaletteCorrection = true;

                                                                                              // Load a GIF image in a progressive way.
                                                                                              // An interlaced GIF doesn't display its scanlines linearly from top to bottom, but instead reorders it
                                                                                              // so the content of the GIF becomes clear even before it finishes loading.
                                                                                              saveOptions.Interlaced = true;

                                                                                              // Save as a lossless GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossless GIF: {0} bytes.", stream.Length);
                                                                                              }

                                                                                              // Set the maximum allowed pixel difference. If greater than zero, lossy compression will be used.
                                                                                              // The recommended value for optimal lossy compression is 80. 30 is very light compression, 200 is heavy.
                                                                                              saveOptions.MaxDiff = 80;

                                                                                              // Save as a lossy GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.lossy.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossy GIF: {0} bytes.", stream.Length);
                                                                                              }
                                                                                          }

                                                                                          //The output may look like this:
                                                                                          //The size of the lossless GIF: 212816 bytes.
                                                                                          //The size of the lossy GIF: 89726 bytes.

Remarks

Tùy chỉnh palette có nghĩa là bất cứ khi nào hình ảnh được xuất vào GIF, màu hình ảnh nguồn sẽ được phân tích.để xây dựng bảng điều khiển phù hợp tốt nhất (trong trường hợp bảng điều khiển hình ảnh không tồn tại hoặc không được chỉ định trong các tùy chọn).Quá trình phân tích mất một thời gian nhưng hình ảnh kết quả sẽ có bảng màu phù hợp tốt nhất và kết quả sẽ tốt hơn về mặt thị giác.

HasTrailer

Nhận hoặc đặt một giá trị cho biết liệu GIF có trailer hay không.

public bool HasTrailer { get; set; }

Giá trị bất động sản

bool

HasTransparentColor

Nhận hoặc đặt một giá trị cho thấy liệu một hình ảnh GIF có màu sắc minh bạch hay không.Nếu giá trị trả lại là 0 0 0, tài sản này bị ảnh hưởng bởi bối cảnh hình ảnh nguồn.

[JsonProperty]
public bool? HasTransparentColor { get; set; }

Giá trị bất động sản

bool ?

Interlaced

Đúng nếu hình ảnh phải được liên kết.

public bool Interlaced { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ này cho thấy cách lưu một hình ảnh BMP vào định dạng GIF bằng cách sử dụng các tùy chọn khác nhau.

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

                                                                                          using (Aspose.Imaging.Image bmpImage = new Aspose.Imaging.FileFormats.Bmp.BmpImage(1000, 1000))
                                                                                          {
                                                                                              // Fill the entire image with the blue-yellow gradient.
                                                                                              Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                      new Aspose.Imaging.Point(0, 0),
                                                                                                      new Aspose.Imaging.Point(bmpImage.Width, bmpImage.Height),
                                                                                                      Aspose.Imaging.Color.Blue,
                                                                                                      Aspose.Imaging.Color.Yellow);

                                                                                              Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(bmpImage);
                                                                                              graphics.FillRectangle(gradientBrush, bmpImage.Bounds);

                                                                                              Aspose.Imaging.ImageOptions.GifOptions saveOptions = new Aspose.Imaging.ImageOptions.GifOptions();

                                                                                              // The number of bits required to store a color, minus 1.
                                                                                              saveOptions.ColorResolution = 7;

                                                                                              // Palette correction means that whenever image is exported to GIF the source image colors will be analyzed
                                                                                              // in order to build the best matching palette (in case image Palette does not exist or not specified in the options)
                                                                                              saveOptions.DoPaletteCorrection = true;

                                                                                              // Load a GIF image in a progressive way.
                                                                                              // An interlaced GIF doesn't display its scanlines linearly from top to bottom, but instead reorders it
                                                                                              // so the content of the GIF becomes clear even before it finishes loading.
                                                                                              saveOptions.Interlaced = true;

                                                                                              // Save as a lossless GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossless GIF: {0} bytes.", stream.Length);
                                                                                              }

                                                                                              // Set the maximum allowed pixel difference. If greater than zero, lossy compression will be used.
                                                                                              // The recommended value for optimal lossy compression is 80. 30 is very light compression, 200 is heavy.
                                                                                              saveOptions.MaxDiff = 80;

                                                                                              // Save as a lossy GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.lossy.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossy GIF: {0} bytes.", stream.Length);
                                                                                              }
                                                                                          }

                                                                                          //The output may look like this:
                                                                                          //The size of the lossless GIF: 212816 bytes.
                                                                                          //The size of the lossy GIF: 89726 bytes.

IsPaletteSorted

Nhận hoặc đặt một giá trị cho thấy liệu các entries palette được sắp xếp hay không.

public bool IsPaletteSorted { get; set; }

Giá trị bất động sản

bool

LoopsCount

Nhận hoặc đặt số loops (Default 1 loop)

public int LoopsCount { get; set; }

Giá trị bất động sản

int

MaxDiff

Nhận hoặc đặt sự khác biệt pixel tối đa được cho phép.Nếu lớn hơn 0 thì áp suất mất sẽ được sử dụng.Giá trị khuyến cáo cho giảm thiểu tối ưu là 80. 30 là giảm rất nhẹ, 200 là nặng.Nó hoạt động tốt nhất khi chỉ có một tổn thất nhỏ được giới thiệu, và do hạn chế của thuật toán nén rất cao mức tổn thất sẽ không mang lại nhiều lợi nhuận.Dung lượng các giá trị được phép là [0, 1000].

public int MaxDiff { get; set; }

Giá trị bất động sản

int

Examples

Ví dụ này cho thấy cách lưu một hình ảnh BMP vào định dạng GIF bằng cách sử dụng các tùy chọn khác nhau.

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

                                                                                          using (Aspose.Imaging.Image bmpImage = new Aspose.Imaging.FileFormats.Bmp.BmpImage(1000, 1000))
                                                                                          {
                                                                                              // Fill the entire image with the blue-yellow gradient.
                                                                                              Aspose.Imaging.Brushes.LinearGradientBrush gradientBrush = new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                      new Aspose.Imaging.Point(0, 0),
                                                                                                      new Aspose.Imaging.Point(bmpImage.Width, bmpImage.Height),
                                                                                                      Aspose.Imaging.Color.Blue,
                                                                                                      Aspose.Imaging.Color.Yellow);

                                                                                              Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(bmpImage);
                                                                                              graphics.FillRectangle(gradientBrush, bmpImage.Bounds);

                                                                                              Aspose.Imaging.ImageOptions.GifOptions saveOptions = new Aspose.Imaging.ImageOptions.GifOptions();

                                                                                              // The number of bits required to store a color, minus 1.
                                                                                              saveOptions.ColorResolution = 7;

                                                                                              // Palette correction means that whenever image is exported to GIF the source image colors will be analyzed
                                                                                              // in order to build the best matching palette (in case image Palette does not exist or not specified in the options)
                                                                                              saveOptions.DoPaletteCorrection = true;

                                                                                              // Load a GIF image in a progressive way.
                                                                                              // An interlaced GIF doesn't display its scanlines linearly from top to bottom, but instead reorders it
                                                                                              // so the content of the GIF becomes clear even before it finishes loading.
                                                                                              saveOptions.Interlaced = true;

                                                                                              // Save as a lossless GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossless GIF: {0} bytes.", stream.Length);
                                                                                              }

                                                                                              // Set the maximum allowed pixel difference. If greater than zero, lossy compression will be used.
                                                                                              // The recommended value for optimal lossy compression is 80. 30 is very light compression, 200 is heavy.
                                                                                              saveOptions.MaxDiff = 80;

                                                                                              // Save as a lossy GIF.
                                                                                              using (System.IO.Stream stream = System.IO.File.OpenWrite(dir + "output.lossy.gif"))
                                                                                              {
                                                                                                  bmpImage.Save(stream, saveOptions);
                                                                                                  System.Console.WriteLine("The size of the lossy GIF: {0} bytes.", stream.Length);
                                                                                              }
                                                                                          }

                                                                                          //The output may look like this:
                                                                                          //The size of the lossless GIF: 212816 bytes.
                                                                                          //The size of the lossy GIF: 89726 bytes.

PixelAspectRatio

Nhận hoặc đặt tỷ lệ khía cạnh GIF pixel.

public byte PixelAspectRatio { get; set; }

Giá trị bất động sản

byte

Remarks

Pixel Aspect Ratio - Các yếu tố được sử dụng để tính toán sự gần gũivề tỷ lệ khía cạnh của pixel trong hình ảnh ban đầu. nếugiá trị của trường không phải là 0, sự gần gũi của tỷ lệ khía cạnhđược tính toán dựa trên công thức:Aspect Ratio = (Pixel Aspect Ratio + 15) / 64Pixel Aspect Ratio được định nghĩa là tỷ lệ của pixel.chiều rộng trên chiều cao của nó. phạm vi giá trị trong lĩnh vực này cho phépĐiển hình của pixel rộng nhất từ 4:1 đến pixel cao nhất của1:4 trong tăng 1/64th.Giá trị :0 - Không được cung cấp thông tin tỷ lệ khía cạnh.1.255 - Giá trị được sử dụng trong tính toán.

 Tiếng Việt