Class TiffOptions

Class TiffOptions

İsim alanı : Aspose.Imaging.ImageOptions Toplantı: Aspose.Imaging.dll (25.4.0)

Tiff dosya biçimi seçenekleri.Genişlik ve yükseklik etiketleri genişlik ve yükseklik parametreleri ile görüntü oluşturma üzerinde aşırı yazılacaktır, bu yüzden doğrudan belirtmek gerekmez.Birçok seçeneğin varsayılan bir değeri iade ettiğini unutmayın, ancak bu seçenek açıkça bir etiket değeri olarak ayarlandığı anlamına gelmez. etiketin mevcut olduğunu doğrulamak için etiket özelliklerini veya ilgili IsTagPresent yöntemi kullanın.

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

Inheritance

object DisposableObject ImageOptionsBase TiffOptions

Derived

BigTiffOptions

Implements

IDisposable , ICloneable , IHasExifData , IHasXmpData , IHasMetadata

mirasçı üyeleri

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

Bu örnek, SaveOptions Namespace’den farklı sınıfların ihracat amaçları için kullanıldığını gösterir.Gif tipi bir görüntü bir görüntü örneğine yüklenir ve daha sonra çeşitli biçimlere ihraç edilir.

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));
                                                                                                                                                                                                                    }

Aşağıdaki örnek, belirli bir görüntü türüne atıfta bulunmaksızın bir çok sayfa vektör görüntüsünü genel olarak TIFF biçimine nasıl dönüştürdüğünü göstermektedir.

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.tiff");

                                                                                                                                                            Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

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

                                                                                                                                                                // Export only first two pages. These pages will be presented as frames in the output TIFF.
                                                                                                                                                                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);
                                                                                                                                                            }

Bu örnekler, bir görüntü yüzeyinde figürler oluşturmak ve manipüle etmek için GraphicsPath ve Graphics sınıfını kullanır. Örnek yeni bir görüntü oluşturur (tiff tipi), yüzeyi temizler ve GraphicsPath sınıfının yardımıyla yolları çeker.

//Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                             using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                                 //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                                 tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                                 {
                                                                                                                                                                                                                                                                                                                                                     //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                     //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                     graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                     //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                     //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                     graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                     //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                     graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

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

Constructors

TiffOptions(TiffExpectedFormat ve TiffByteOrder)

Aspose.Imaging.ImageOptions.TiffOptions sınıfının yeni bir örneğini başlatır.

public TiffOptions(TiffExpectedFormat expectedFormat, TiffByteOrder byteOrder)

Parameters

expectedFormat TiffExpectedFormat

beklenen tiff dosya biçimi.

byteOrder TiffByteOrder

Tif dosya biçimi kullanmak için byte sipariş.

TiffOptions(TiffExpectedFormat)

Aspose.Imaging.ImageOptions.TiffOptions sınıfının yeni bir örneğini başlatır.

public TiffOptions(TiffExpectedFormat expectedFormat)

Parameters

expectedFormat TiffExpectedFormat

beklenen tiff dosya biçimi.

Examples

Aşağıdaki örnek, mevcut bir çerçeveye bir grayscale kopyasını nasıl oluşturacağınızı ve bir TIFF görüntüsüne nasıl ekleyeceğinizi gösterir.

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

                                                                                                                      Aspose.Imaging.ImageOptions.TiffOptions createTiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                      // Create a permanent, not temporary file source.
                                                                                                                      createTiffOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(dir + "multipage.tif", false);
                                                                                                                      createTiffOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;
                                                                                                                      createTiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                                      using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Create(createTiffOptions, 100, 100))
                                                                                                                      {
                                                                                                                          // The linear gradient from the left-top to the right-bottom corner of the image.
                                                                                                                          Aspose.Imaging.Brushes.LinearGradientBrush brush =
                                                                                                                              new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                                  new Aspose.Imaging.Point(0, 0),
                                                                                                                                  new Aspose.Imaging.Point(tiffImage.Width, tiffImage.Height),
                                                                                                                                  Aspose.Imaging.Color.Red,
                                                                                                                                  Aspose.Imaging.Color.Green);

                                                                                                                          // Fill the active frame with a linear gradient brush.
                                                                                                                          Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(tiffImage.ActiveFrame);
                                                                                                                          gr.FillRectangle(brush, tiffImage.Bounds);

                                                                                                                          // Grayscale options
                                                                                                                          Aspose.Imaging.ImageOptions.TiffOptions createTiffFrameOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                                          createTiffFrameOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream());
                                                                                                                          createTiffFrameOptions.Photometric = Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;
                                                                                                                          createTiffFrameOptions.BitsPerSample = new ushort[] { 8 };

                                                                                                                          // Create a grayscale copy of the active frame.
                                                                                                                          // The pixel data is preserved but converted to the desired format.
                                                                                                                          Aspose.Imaging.FileFormats.Tiff.TiffFrame grayscaleFrame = Aspose.Imaging.FileFormats.Tiff.TiffFrame.CreateFrameFrom(tiffImage.ActiveFrame, createTiffFrameOptions);

                                                                                                                          // Add the newly created frame to the TIFF image.
                                                                                                                          tiffImage.AddFrame(grayscaleFrame);

                                                                                                                          tiffImage.Save();
                                                                                                                      }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

TiffOptions(TiffOptions)

Aspose.Imaging.ImageOptions.TiffOptions sınıfının yeni bir örneğini başlatır.

public TiffOptions(TiffOptions options)

Parameters

options TiffOptions

Kopyalamak için seçenekler.

TiffOptions(TiffDataType[])

Aspose.Imaging.ImageOptions.TiffOptions sınıfının yeni bir örneğini başlatır.

public TiffOptions(TiffDataType[] tags)

Parameters

tags TiffDataType […]

Seçenekleri başlatmak için etiketler ile.

Properties

AlphaStorage

Alfa depolama seçeneğini alır veya ayarlar. Aspose.Imaging.FileFormats.Tiff.Enums.TiffAlphaStorage.Unspecified dışında seçenekler3’ten fazla Aspose.Imaging.ImageOptions.TiffOptions.SamplesPerPixel tanımlandığında kullanılır.

public TiffAlphaStorage AlphaStorage { get; set; }

Mülkiyet Değer

TiffAlphaStorage

Artist

Sanatçıyı alır ya da yerleştirir.

public string Artist { get; set; }

Mülkiyet Değer

string

BitsPerPixel

Piksel başına bit alır.

public int BitsPerPixel { get; }

Mülkiyet Değer

int

BitsPerSample

Örnek olarak bitleri alır veya ayarlar.

public ushort[] BitsPerSample { get; set; }

Mülkiyet Değer

ushort […]

Examples

Bu örnek, bir TIFF görüntüsünü çerçeveden nasıl oluşturacağınızı ve bir dosyaya nasıl kaydedeceğinizi gösterir.

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

                                                                                            Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                            // Set 8 bits for each color component.
                                                                                            createOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                            // Set the Big Endian byte order (Motorola)
                                                                                            createOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                            // Set the LZW compression.
                                                                                            createOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                            // Set the RGB color model.
                                                                                            createOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                            // All color components will be stored within a single plane.
                                                                                            createOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                            // Create a TIFF Frame of 100x100 px.
                                                                                            // Note that you don't have to dispose a frame explicitly if it is included into TiffImage.
                                                                                            // When the container is disposed all frames will be disposed automatically.
                                                                                            Aspose.Imaging.FileFormats.Tiff.TiffFrame firstFrame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions, 100, 100);

                                                                                            // Fill the entire frame 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(firstFrame.Width, firstFrame.Height),
                                                                                                    Aspose.Imaging.Color.Blue,
                                                                                                    Aspose.Imaging.Color.Yellow);

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

                                                                                            // Create a TIFF image.
                                                                                            using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(firstFrame))
                                                                                            {
                                                                                                tiffImage.Save(dir + "output.tif");
                                                                                            }

Aşağıdaki örnek, bir mutlipage TIFF’yi bireysel raster görüntülerinden nasıl oluşturacağınızı gösterir.

Aspose.Imaging.ImageOptions.TiffOptions createTiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                     createTiffOptions.Source = new Aspose.Imaging.Sources.FileCreateSource("c:\\temp\\multipage.tif", false);
                                                                                                     createTiffOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;
                                                                                                     createTiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                     using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Create(createTiffOptions, 100, 100))
                                                                                                     {
                                                                                                         // This is Font and Brush for drawing text on individual frames.
                                                                                                         Aspose.Imaging.Font font = new Aspose.Imaging.Font("Arial", 64);
                                                                                                         Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.White);

                                                                                                         // Create 5 frames
                                                                                                         for (int i = 1; i <= 5; i++)
                                                                                                         {
                                                                                                             Aspose.Imaging.ImageOptions.PngOptions createPngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
                                                                                                             createPngOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream());

                                                                                                             // Create a PNG image and draw the number of page on it.
                                                                                                             Aspose.Imaging.FileFormats.Png.PngImage pngImage = (Aspose.Imaging.FileFormats.Png.PngImage)Image.Create(createPngOptions, 100, 100);
                                                                                                             Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(pngImage);
                                                                                                             gr.DrawString(i.ToString(), font, brush, 10, 10);

                                                                                                             // Create a frame based on the PNG image.
                                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(pngImage);

                                                                                                             // Add the frame to the TIFF image.
                                                                                                             tiffImage.AddFrame(frame);
                                                                                                         }

                                                                                                         // The image was created with a single default frame. Let's remove it.
                                                                                                         Aspose.Imaging.FileFormats.Tiff.TiffFrame activeFrame = tiffImage.ActiveFrame;
                                                                                                         tiffImage.ActiveFrame = tiffImage.Frames[1];
                                                                                                         tiffImage.RemoveFrame(0);

                                                                                                         // Don't forget to dispose the frame if you won't add it to some other TiffImage
                                                                                                         activeFrame.Dispose();

                                                                                                         tiffImage.Save();
                                                                                                     }

Aşağıdaki örnek, mevcut bir çerçeveye bir grayscale kopyasını nasıl oluşturacağınızı ve bir TIFF görüntüsüne nasıl ekleyeceğinizi gösterir.

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

                                                                                                                      Aspose.Imaging.ImageOptions.TiffOptions createTiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                      // Create a permanent, not temporary file source.
                                                                                                                      createTiffOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(dir + "multipage.tif", false);
                                                                                                                      createTiffOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;
                                                                                                                      createTiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                                      using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Create(createTiffOptions, 100, 100))
                                                                                                                      {
                                                                                                                          // The linear gradient from the left-top to the right-bottom corner of the image.
                                                                                                                          Aspose.Imaging.Brushes.LinearGradientBrush brush =
                                                                                                                              new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                                  new Aspose.Imaging.Point(0, 0),
                                                                                                                                  new Aspose.Imaging.Point(tiffImage.Width, tiffImage.Height),
                                                                                                                                  Aspose.Imaging.Color.Red,
                                                                                                                                  Aspose.Imaging.Color.Green);

                                                                                                                          // Fill the active frame with a linear gradient brush.
                                                                                                                          Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(tiffImage.ActiveFrame);
                                                                                                                          gr.FillRectangle(brush, tiffImage.Bounds);

                                                                                                                          // Grayscale options
                                                                                                                          Aspose.Imaging.ImageOptions.TiffOptions createTiffFrameOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                                          createTiffFrameOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream());
                                                                                                                          createTiffFrameOptions.Photometric = Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;
                                                                                                                          createTiffFrameOptions.BitsPerSample = new ushort[] { 8 };

                                                                                                                          // Create a grayscale copy of the active frame.
                                                                                                                          // The pixel data is preserved but converted to the desired format.
                                                                                                                          Aspose.Imaging.FileFormats.Tiff.TiffFrame grayscaleFrame = Aspose.Imaging.FileFormats.Tiff.TiffFrame.CreateFrameFrom(tiffImage.ActiveFrame, createTiffFrameOptions);

                                                                                                                          // Add the newly created frame to the TIFF image.
                                                                                                                          tiffImage.AddFrame(grayscaleFrame);

                                                                                                                          tiffImage.Save();
                                                                                                                      }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Bu örnek, 2 çerçeve ile bir TIFF görüntüsü nasıl oluşturulur ve bir dosyaya kaydedilir.

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions1 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 8 bits for each color component.
                                                                                             createOptions1.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                             // Set the Big Endian byte order (Motorola)
                                                                                             createOptions1.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                             // Set the LZW compression.
                                                                                             createOptions1.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                             // Set the RGB color model.
                                                                                             createOptions1.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                             // All color components will be stored within a single plane.
                                                                                             createOptions1.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                             // Create the first TIFF frame of 100x100 px.
                                                                                             // Note that you don't have to dispose frames explicitly if they are included into TiffImage.
                                                                                             // When the container is disposed all frames will be disposed automatically.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame1 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions1, 100, 100);

                                                                                             // Fill the first frame 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(frame1.Width, frame1.Height),
                                                                                                     Aspose.Imaging.Color.Blue,
                                                                                                     Aspose.Imaging.Color.Yellow);

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions2 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 1 bit per pixel for a B/W image.
                                                                                             createOptions2.BitsPerSample = new ushort[] { 1 };

                                                                                             // Set the Little Endian byte order (Intel)
                                                                                             createOptions2.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.LittleEndian;

                                                                                             // Set the CCITT Group 3 Fax compression.
                                                                                             createOptions2.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.CcittFax3;

                                                                                             // Set the B/W color model where 0 is black, 1 is white.
                                                                                             createOptions2.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;

                                                                                             // Create the second TIFF frame of 200x200px.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame2 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions2, 200, 200);

                                                                                             // Fill the second frame with the blue-yellow gradient.
                                                                                             // It will be automatically converted to the B/W format due to the corresponding settings of the frame.
                                                                                             Aspose.Imaging.Graphics graphics2 = new Aspose.Imaging.Graphics(frame2);
                                                                                             graphics2.FillRectangle(gradientBrush, frame2.Bounds);

                                                                                             // Create a TIFF image.
                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(
                                                                                                 new Aspose.Imaging.FileFormats.Tiff.TiffFrame[] { frame1, frame2 }))
                                                                                             {
                                                                                                 tiffImage.Save(dir + "output.mutliframe.tif");
                                                                                             }

Remarks

Bu değeri ayarladığınızda, SamplesPerPixel değerini uzunluğa ayarlayacağını da unutmayın. Bu 2 özellik çok sıkı bir şekilde birleştirilmiştir, bu nedenle sadece tümüyle ayarlanabilir.

ByteOrder

Tif byte siparişini gösteren bir değer alır veya ayarlar.

public TiffByteOrder ByteOrder { get; set; }

Mülkiyet Değer

TiffByteOrder

Examples

Bu örnek, bir TIFF görüntüsünü çerçeveden nasıl oluşturacağınızı ve bir dosyaya nasıl kaydedeceğinizi gösterir.

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

                                                                                            Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                            // Set 8 bits for each color component.
                                                                                            createOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                            // Set the Big Endian byte order (Motorola)
                                                                                            createOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                            // Set the LZW compression.
                                                                                            createOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                            // Set the RGB color model.
                                                                                            createOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                            // All color components will be stored within a single plane.
                                                                                            createOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                            // Create a TIFF Frame of 100x100 px.
                                                                                            // Note that you don't have to dispose a frame explicitly if it is included into TiffImage.
                                                                                            // When the container is disposed all frames will be disposed automatically.
                                                                                            Aspose.Imaging.FileFormats.Tiff.TiffFrame firstFrame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions, 100, 100);

                                                                                            // Fill the entire frame 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(firstFrame.Width, firstFrame.Height),
                                                                                                    Aspose.Imaging.Color.Blue,
                                                                                                    Aspose.Imaging.Color.Yellow);

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

                                                                                            // Create a TIFF image.
                                                                                            using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(firstFrame))
                                                                                            {
                                                                                                tiffImage.Save(dir + "output.tif");
                                                                                            }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Bu örnek, 2 çerçeve ile bir TIFF görüntüsü nasıl oluşturulur ve bir dosyaya kaydedilir.

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions1 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 8 bits for each color component.
                                                                                             createOptions1.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                             // Set the Big Endian byte order (Motorola)
                                                                                             createOptions1.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                             // Set the LZW compression.
                                                                                             createOptions1.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                             // Set the RGB color model.
                                                                                             createOptions1.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                             // All color components will be stored within a single plane.
                                                                                             createOptions1.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                             // Create the first TIFF frame of 100x100 px.
                                                                                             // Note that you don't have to dispose frames explicitly if they are included into TiffImage.
                                                                                             // When the container is disposed all frames will be disposed automatically.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame1 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions1, 100, 100);

                                                                                             // Fill the first frame 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(frame1.Width, frame1.Height),
                                                                                                     Aspose.Imaging.Color.Blue,
                                                                                                     Aspose.Imaging.Color.Yellow);

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions2 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 1 bit per pixel for a B/W image.
                                                                                             createOptions2.BitsPerSample = new ushort[] { 1 };

                                                                                             // Set the Little Endian byte order (Intel)
                                                                                             createOptions2.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.LittleEndian;

                                                                                             // Set the CCITT Group 3 Fax compression.
                                                                                             createOptions2.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.CcittFax3;

                                                                                             // Set the B/W color model where 0 is black, 1 is white.
                                                                                             createOptions2.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;

                                                                                             // Create the second TIFF frame of 200x200px.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame2 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions2, 200, 200);

                                                                                             // Fill the second frame with the blue-yellow gradient.
                                                                                             // It will be automatically converted to the B/W format due to the corresponding settings of the frame.
                                                                                             Aspose.Imaging.Graphics graphics2 = new Aspose.Imaging.Graphics(frame2);
                                                                                             graphics2.FillRectangle(gradientBrush, frame2.Bounds);

                                                                                             // Create a TIFF image.
                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(
                                                                                                 new Aspose.Imaging.FileFormats.Tiff.TiffFrame[] { frame1, frame2 }))
                                                                                             {
                                                                                                 tiffImage.Save(dir + "output.mutliframe.tif");
                                                                                             }

ColorMap

Renk haritasını alın veya ayarlayın.

public ushort[] ColorMap { get; set; }

Mülkiyet Değer

ushort […]

Exceptions

ArgumentNullException

Değer

TiffImageException

Renk haritası, piksel başına örnekler için sadece 1’e eşit olarak tanımlanabilir.veyaÖrnek başına bitler belirlenmemiştir.

ArgumentOutOfRangeException

değer;Array uzunluğu takip formülü ile eşleşmelidir: 3 * (2**BitsPerSample).

CompressedQuality

Sıkıştırılmış görüntü kalitesini alır veya ayarlar.Jpeg kompresyonu ile kullanılır.

public int CompressedQuality { get; set; }

Mülkiyet Değer

int

Examples

Bu örnek, Jpeg kompresyonu ve belirtilen sıkıştırılmış görüntü kalitesi ile TIFF görüntüsünü nasıl oluşturacağınızı gösterir.

using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load("c:\\temp\\zeebra.tif"))
                                                                                                                              {
                                                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                                                  // Set the RGB color model.
                                                                                                                                  tiffOptions.Photometric = TiffPhotometrics.Rgb;
                                                                                                                                  // Set the Jpeg compression.
                                                                                                                                  tiffOptions.Compression = TiffCompressions.Jpeg;
                                                                                                                                  tiffOptions.CompressedQuality = 50;
                                                                                                                                  // Set 8 bits for each color component.
                                                                                                                                  tiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                                                  image.Save("zeebra.tif-50.tiff", tiffOptions);
                                                                                                                              }

Compression

Kompresyonu alır veya ayarlar.

public TiffCompressions Compression { get; set; }

Mülkiyet Değer

TiffCompressions

Examples

Bu örnek, bir TIFF görüntüsünü çerçeveden nasıl oluşturacağınızı ve bir dosyaya nasıl kaydedeceğinizi gösterir.

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

                                                                                            Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                            // Set 8 bits for each color component.
                                                                                            createOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                            // Set the Big Endian byte order (Motorola)
                                                                                            createOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                            // Set the LZW compression.
                                                                                            createOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                            // Set the RGB color model.
                                                                                            createOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                            // All color components will be stored within a single plane.
                                                                                            createOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                            // Create a TIFF Frame of 100x100 px.
                                                                                            // Note that you don't have to dispose a frame explicitly if it is included into TiffImage.
                                                                                            // When the container is disposed all frames will be disposed automatically.
                                                                                            Aspose.Imaging.FileFormats.Tiff.TiffFrame firstFrame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions, 100, 100);

                                                                                            // Fill the entire frame 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(firstFrame.Width, firstFrame.Height),
                                                                                                    Aspose.Imaging.Color.Blue,
                                                                                                    Aspose.Imaging.Color.Yellow);

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

                                                                                            // Create a TIFF image.
                                                                                            using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(firstFrame))
                                                                                            {
                                                                                                tiffImage.Save(dir + "output.tif");
                                                                                            }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Bu örnek, 2 çerçeve ile bir TIFF görüntüsü nasıl oluşturulur ve bir dosyaya kaydedilir.

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions1 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 8 bits for each color component.
                                                                                             createOptions1.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                             // Set the Big Endian byte order (Motorola)
                                                                                             createOptions1.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                             // Set the LZW compression.
                                                                                             createOptions1.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                             // Set the RGB color model.
                                                                                             createOptions1.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                             // All color components will be stored within a single plane.
                                                                                             createOptions1.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                             // Create the first TIFF frame of 100x100 px.
                                                                                             // Note that you don't have to dispose frames explicitly if they are included into TiffImage.
                                                                                             // When the container is disposed all frames will be disposed automatically.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame1 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions1, 100, 100);

                                                                                             // Fill the first frame 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(frame1.Width, frame1.Height),
                                                                                                     Aspose.Imaging.Color.Blue,
                                                                                                     Aspose.Imaging.Color.Yellow);

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions2 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 1 bit per pixel for a B/W image.
                                                                                             createOptions2.BitsPerSample = new ushort[] { 1 };

                                                                                             // Set the Little Endian byte order (Intel)
                                                                                             createOptions2.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.LittleEndian;

                                                                                             // Set the CCITT Group 3 Fax compression.
                                                                                             createOptions2.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.CcittFax3;

                                                                                             // Set the B/W color model where 0 is black, 1 is white.
                                                                                             createOptions2.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;

                                                                                             // Create the second TIFF frame of 200x200px.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame2 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions2, 200, 200);

                                                                                             // Fill the second frame with the blue-yellow gradient.
                                                                                             // It will be automatically converted to the B/W format due to the corresponding settings of the frame.
                                                                                             Aspose.Imaging.Graphics graphics2 = new Aspose.Imaging.Graphics(frame2);
                                                                                             graphics2.FillRectangle(gradientBrush, frame2.Bounds);

                                                                                             // Create a TIFF image.
                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(
                                                                                                 new Aspose.Imaging.FileFormats.Tiff.TiffFrame[] { frame1, frame2 }))
                                                                                             {
                                                                                                 tiffImage.Save(dir + "output.mutliframe.tif");
                                                                                             }

Copyright

Telif hakkını alır veya ayarlar.

public string Copyright { get; set; }

Mülkiyet Değer

string

DateTime

Tarih ve saat alın veya ayarlayın.

public string DateTime { get; set; }

Mülkiyet Değer

string

DefaultMemoryAllocationLimit

Alınan veya varsayılan hafıza dağıtım sınırını ayarlayın.

[Obsolete("Use Aspose.Imaging.Image.BufferSizeHint, Aspose.Imaging.ImageOptionsBase.BufferSizeHint or Aspose.Imaging.LoadOptions.BufferSizeHint instead.")]
public int DefaultMemoryAllocationLimit { get; set; }

Mülkiyet Değer

int

DisableIccExport

ICC profili ihracatının devre dışı bırakıldığını gösteren bir değer alır veya ayarlar (ICC profili kaynak piksellerine önceden uygulanır).

[JsonProperty]
public bool DisableIccExport { get; set; }

Mülkiyet Değer

bool

DocumentName

Belgenin adını alır veya koyar.

public string DocumentName { get; set; }

Mülkiyet Değer

string

ExifData

Exif verileri alır veya ayarlar.

public ExifData ExifData { get; set; }

Mülkiyet Değer

ExifData

ExifIfd

Göstericiyi EXIF IFD’ye alır veya ayarlar.

public TiffExifIfd ExifIfd { get; }

Mülkiyet Değer

TiffExifIfd

ExtraSamples

Ekstra örnek değerleri alır.

public ushort[] ExtraSamples { get; }

Mülkiyet Değer

ushort […]

FaxT4Options

Faks t4 seçeneğini alır veya ayarlar.

public Group3Options FaxT4Options { get; set; }

Mülkiyet Değer

Group3Options

FileStandard

TIFF dosya standartını alır veya ayarlar.

public TiffFileStandards FileStandard { get; set; }

Mülkiyet Değer

TiffFileStandards

FillOrder

Bit bitleri doldurma siparişi alır veya koyar.

public TiffFillOrders FillOrder { get; set; }

Mülkiyet Değer

TiffFillOrders

HalfToneHints

Yarım noktayı alır ya da ayarlar.

public ushort[] HalfToneHints { get; set; }

Mülkiyet Değer

ushort […]

Exceptions

ArgumentNullException

Değer

ArgumentOutOfRangeException

değer;Halftone ipuçları array uzunluğu 2 eşit olmalıdır.

IccProfile

Icc profil akışını alır veya ayarlar.

public MemoryStream IccProfile { get; set; }

Mülkiyet Değer

MemoryStream

ImageDescription

Görüntülemeyi alır veya ayarlar.

public string ImageDescription { get; set; }

Mülkiyet Değer

string

ImageLength

Görüntü uzunluğunu alır veya ayarlar.

public uint ImageLength { get; set; }

Mülkiyet Değer

uint

ImageWidth

Görüntü genişliğini alır veya ayarlar.

public uint ImageWidth { get; set; }

Mülkiyet Değer

uint

InkNames

Alın veya ink isimlerini ayarlayın.

public string InkNames { get; set; }

Mülkiyet Değer

string

IsExtraSamplesPresent

Ek örneklerin mevcut olup olmadığını gösteren bir değer alır.

public bool IsExtraSamplesPresent { get; }

Mülkiyet Değer

bool

IsTiled

Görüntünün silinmiş olup olmadığını gösteren bir değer alır.

public bool IsTiled { get; }

Mülkiyet Değer

bool

IsValid

Aspose.Imaging.ImageOptions.TiffOptions düzgün bir şekilde yapılandırılmış olup olmadığını gösteren bir değer alır.

public bool IsValid { get; }

Mülkiyet Değer

bool

MaxSampleValue

Max örnek değerini alır veya ayarlar.

public ushort[] MaxSampleValue { get; set; }

Mülkiyet Değer

ushort […]

Exceptions

ArgumentNullException

Değer

ArgumentOutOfRangeException

değer;Array uzunluğu, piksel sayısı başına örneklere uygun olmalıdır.

MinSampleValue

Örnek değerini alır veya ayarlar.

public ushort[] MinSampleValue { get; set; }

Mülkiyet Değer

ushort […]

Exceptions

ArgumentNullException

Değer

ArgumentOutOfRangeException

değer;Array uzunluğu, piksel sayısı başına örneklere uygun olmalıdır.

Orientation

Yönlendirme veya yönlendirme yapılır.

public TiffOrientations Orientation { get; set; }

Mülkiyet Değer

TiffOrientations

PageName

Sayfanın adını alır ya da koyar.

public string PageName { get; set; }

Mülkiyet Değer

string

PageNumber

Sayfa sayısı veya sayfa sayısı belirlenir.

public ushort[] PageNumber { get; set; }

Mülkiyet Değer

ushort […]

Exceptions

ArgumentNullException

Değer

ArgumentOutOfRangeException

Sayfa sayısı: Sayfa sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı sayısı

Palette

Renk paleti alır veya koyar.

public override IColorPalette Palette { get; set; }

Mülkiyet Değer

IColorPalette

Photometric

Fotoğrafçılık yapar ya da yapar.

public TiffPhotometrics Photometric { get; set; }

Mülkiyet Değer

TiffPhotometrics

Examples

Bu örnek, bir TIFF görüntüsünü çerçeveden nasıl oluşturacağınızı ve bir dosyaya nasıl kaydedeceğinizi gösterir.

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

                                                                                            Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                            // Set 8 bits for each color component.
                                                                                            createOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                            // Set the Big Endian byte order (Motorola)
                                                                                            createOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                            // Set the LZW compression.
                                                                                            createOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                            // Set the RGB color model.
                                                                                            createOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                            // All color components will be stored within a single plane.
                                                                                            createOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                            // Create a TIFF Frame of 100x100 px.
                                                                                            // Note that you don't have to dispose a frame explicitly if it is included into TiffImage.
                                                                                            // When the container is disposed all frames will be disposed automatically.
                                                                                            Aspose.Imaging.FileFormats.Tiff.TiffFrame firstFrame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions, 100, 100);

                                                                                            // Fill the entire frame 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(firstFrame.Width, firstFrame.Height),
                                                                                                    Aspose.Imaging.Color.Blue,
                                                                                                    Aspose.Imaging.Color.Yellow);

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

                                                                                            // Create a TIFF image.
                                                                                            using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(firstFrame))
                                                                                            {
                                                                                                tiffImage.Save(dir + "output.tif");
                                                                                            }

Aşağıdaki örnek, bir mutlipage TIFF’yi bireysel raster görüntülerinden nasıl oluşturacağınızı gösterir.

Aspose.Imaging.ImageOptions.TiffOptions createTiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                     createTiffOptions.Source = new Aspose.Imaging.Sources.FileCreateSource("c:\\temp\\multipage.tif", false);
                                                                                                     createTiffOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;
                                                                                                     createTiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                     using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Create(createTiffOptions, 100, 100))
                                                                                                     {
                                                                                                         // This is Font and Brush for drawing text on individual frames.
                                                                                                         Aspose.Imaging.Font font = new Aspose.Imaging.Font("Arial", 64);
                                                                                                         Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.White);

                                                                                                         // Create 5 frames
                                                                                                         for (int i = 1; i <= 5; i++)
                                                                                                         {
                                                                                                             Aspose.Imaging.ImageOptions.PngOptions createPngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
                                                                                                             createPngOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream());

                                                                                                             // Create a PNG image and draw the number of page on it.
                                                                                                             Aspose.Imaging.FileFormats.Png.PngImage pngImage = (Aspose.Imaging.FileFormats.Png.PngImage)Image.Create(createPngOptions, 100, 100);
                                                                                                             Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(pngImage);
                                                                                                             gr.DrawString(i.ToString(), font, brush, 10, 10);

                                                                                                             // Create a frame based on the PNG image.
                                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(pngImage);

                                                                                                             // Add the frame to the TIFF image.
                                                                                                             tiffImage.AddFrame(frame);
                                                                                                         }

                                                                                                         // The image was created with a single default frame. Let's remove it.
                                                                                                         Aspose.Imaging.FileFormats.Tiff.TiffFrame activeFrame = tiffImage.ActiveFrame;
                                                                                                         tiffImage.ActiveFrame = tiffImage.Frames[1];
                                                                                                         tiffImage.RemoveFrame(0);

                                                                                                         // Don't forget to dispose the frame if you won't add it to some other TiffImage
                                                                                                         activeFrame.Dispose();

                                                                                                         tiffImage.Save();
                                                                                                     }

Aşağıdaki örnek, mevcut bir çerçeveye bir grayscale kopyasını nasıl oluşturacağınızı ve bir TIFF görüntüsüne nasıl ekleyeceğinizi gösterir.

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

                                                                                                                      Aspose.Imaging.ImageOptions.TiffOptions createTiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                      // Create a permanent, not temporary file source.
                                                                                                                      createTiffOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(dir + "multipage.tif", false);
                                                                                                                      createTiffOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;
                                                                                                                      createTiffOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                                      using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Create(createTiffOptions, 100, 100))
                                                                                                                      {
                                                                                                                          // The linear gradient from the left-top to the right-bottom corner of the image.
                                                                                                                          Aspose.Imaging.Brushes.LinearGradientBrush brush =
                                                                                                                              new Aspose.Imaging.Brushes.LinearGradientBrush(
                                                                                                                                  new Aspose.Imaging.Point(0, 0),
                                                                                                                                  new Aspose.Imaging.Point(tiffImage.Width, tiffImage.Height),
                                                                                                                                  Aspose.Imaging.Color.Red,
                                                                                                                                  Aspose.Imaging.Color.Green);

                                                                                                                          // Fill the active frame with a linear gradient brush.
                                                                                                                          Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(tiffImage.ActiveFrame);
                                                                                                                          gr.FillRectangle(brush, tiffImage.Bounds);

                                                                                                                          // Grayscale options
                                                                                                                          Aspose.Imaging.ImageOptions.TiffOptions createTiffFrameOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                                          createTiffFrameOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream());
                                                                                                                          createTiffFrameOptions.Photometric = Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;
                                                                                                                          createTiffFrameOptions.BitsPerSample = new ushort[] { 8 };

                                                                                                                          // Create a grayscale copy of the active frame.
                                                                                                                          // The pixel data is preserved but converted to the desired format.
                                                                                                                          Aspose.Imaging.FileFormats.Tiff.TiffFrame grayscaleFrame = Aspose.Imaging.FileFormats.Tiff.TiffFrame.CreateFrameFrom(tiffImage.ActiveFrame, createTiffFrameOptions);

                                                                                                                          // Add the newly created frame to the TIFF image.
                                                                                                                          tiffImage.AddFrame(grayscaleFrame);

                                                                                                                          tiffImage.Save();
                                                                                                                      }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Bu örnek, 2 çerçeve ile bir TIFF görüntüsü nasıl oluşturulur ve bir dosyaya kaydedilir.

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions1 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 8 bits for each color component.
                                                                                             createOptions1.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                             // Set the Big Endian byte order (Motorola)
                                                                                             createOptions1.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                             // Set the LZW compression.
                                                                                             createOptions1.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                             // Set the RGB color model.
                                                                                             createOptions1.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                             // All color components will be stored within a single plane.
                                                                                             createOptions1.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                             // Create the first TIFF frame of 100x100 px.
                                                                                             // Note that you don't have to dispose frames explicitly if they are included into TiffImage.
                                                                                             // When the container is disposed all frames will be disposed automatically.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame1 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions1, 100, 100);

                                                                                             // Fill the first frame 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(frame1.Width, frame1.Height),
                                                                                                     Aspose.Imaging.Color.Blue,
                                                                                                     Aspose.Imaging.Color.Yellow);

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions2 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 1 bit per pixel for a B/W image.
                                                                                             createOptions2.BitsPerSample = new ushort[] { 1 };

                                                                                             // Set the Little Endian byte order (Intel)
                                                                                             createOptions2.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.LittleEndian;

                                                                                             // Set the CCITT Group 3 Fax compression.
                                                                                             createOptions2.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.CcittFax3;

                                                                                             // Set the B/W color model where 0 is black, 1 is white.
                                                                                             createOptions2.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;

                                                                                             // Create the second TIFF frame of 200x200px.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame2 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions2, 200, 200);

                                                                                             // Fill the second frame with the blue-yellow gradient.
                                                                                             // It will be automatically converted to the B/W format due to the corresponding settings of the frame.
                                                                                             Aspose.Imaging.Graphics graphics2 = new Aspose.Imaging.Graphics(frame2);
                                                                                             graphics2.FillRectangle(gradientBrush, frame2.Bounds);

                                                                                             // Create a TIFF image.
                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(
                                                                                                 new Aspose.Imaging.FileFormats.Tiff.TiffFrame[] { frame1, frame2 }))
                                                                                             {
                                                                                                 tiffImage.Save(dir + "output.mutliframe.tif");
                                                                                             }

PlanarConfiguration

Planar konfigürasyonunu alır veya ayarlar.

public TiffPlanarConfigs PlanarConfiguration { get; set; }

Mülkiyet Değer

TiffPlanarConfigs

Examples

Bu örnek, bir TIFF görüntüsünü çerçeveden nasıl oluşturacağınızı ve bir dosyaya nasıl kaydedeceğinizi gösterir.

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

                                                                                            Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                            // Set 8 bits for each color component.
                                                                                            createOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                            // Set the Big Endian byte order (Motorola)
                                                                                            createOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                            // Set the LZW compression.
                                                                                            createOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                            // Set the RGB color model.
                                                                                            createOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                            // All color components will be stored within a single plane.
                                                                                            createOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                            // Create a TIFF Frame of 100x100 px.
                                                                                            // Note that you don't have to dispose a frame explicitly if it is included into TiffImage.
                                                                                            // When the container is disposed all frames will be disposed automatically.
                                                                                            Aspose.Imaging.FileFormats.Tiff.TiffFrame firstFrame = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions, 100, 100);

                                                                                            // Fill the entire frame 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(firstFrame.Width, firstFrame.Height),
                                                                                                    Aspose.Imaging.Color.Blue,
                                                                                                    Aspose.Imaging.Color.Yellow);

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

                                                                                            // Create a TIFF image.
                                                                                            using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(firstFrame))
                                                                                            {
                                                                                                tiffImage.Save(dir + "output.tif");
                                                                                            }

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Bu örnek, 2 çerçeve ile bir TIFF görüntüsü nasıl oluşturulur ve bir dosyaya kaydedilir.

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions1 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 8 bits for each color component.
                                                                                             createOptions1.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                             // Set the Big Endian byte order (Motorola)
                                                                                             createOptions1.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                             // Set the LZW compression.
                                                                                             createOptions1.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                             // Set the RGB color model.
                                                                                             createOptions1.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                             // All color components will be stored within a single plane.
                                                                                             createOptions1.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                             // Create the first TIFF frame of 100x100 px.
                                                                                             // Note that you don't have to dispose frames explicitly if they are included into TiffImage.
                                                                                             // When the container is disposed all frames will be disposed automatically.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame1 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions1, 100, 100);

                                                                                             // Fill the first frame 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(frame1.Width, frame1.Height),
                                                                                                     Aspose.Imaging.Color.Blue,
                                                                                                     Aspose.Imaging.Color.Yellow);

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

                                                                                             // Options for the first frame
                                                                                             Aspose.Imaging.ImageOptions.TiffOptions createOptions2 = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                             // Set 1 bit per pixel for a B/W image.
                                                                                             createOptions2.BitsPerSample = new ushort[] { 1 };

                                                                                             // Set the Little Endian byte order (Intel)
                                                                                             createOptions2.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.LittleEndian;

                                                                                             // Set the CCITT Group 3 Fax compression.
                                                                                             createOptions2.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.CcittFax3;

                                                                                             // Set the B/W color model where 0 is black, 1 is white.
                                                                                             createOptions2.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.MinIsBlack;

                                                                                             // Create the second TIFF frame of 200x200px.
                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffFrame frame2 = new Aspose.Imaging.FileFormats.Tiff.TiffFrame(createOptions2, 200, 200);

                                                                                             // Fill the second frame with the blue-yellow gradient.
                                                                                             // It will be automatically converted to the B/W format due to the corresponding settings of the frame.
                                                                                             Aspose.Imaging.Graphics graphics2 = new Aspose.Imaging.Graphics(frame2);
                                                                                             graphics2.FillRectangle(gradientBrush, frame2.Bounds);

                                                                                             // Create a TIFF image.
                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = new Aspose.Imaging.FileFormats.Tiff.TiffImage(
                                                                                                 new Aspose.Imaging.FileFormats.Tiff.TiffFrame[] { frame1, frame2 }))
                                                                                             {
                                                                                                 tiffImage.Save(dir + "output.mutliframe.tif");
                                                                                             }

Predictor

LZW kompresyonu için tahmin cihazını alır veya ayarlar.

public TiffPredictor Predictor { get; set; }

Mülkiyet Değer

TiffPredictor

Examples

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

PremultiplyComponents

Komponentlerin çoğaltılması gerektiğini gösteren bir değer alır veya ayarlar.

[JsonProperty]
public bool PremultiplyComponents { get; set; }

Mülkiyet Değer

bool

ResolutionSettings

Çözünürlük ayarlarını alır veya ayarlar.

public override ResolutionSetting ResolutionSettings { get; set; }

Mülkiyet Değer

ResolutionSetting

ResolutionUnit

Çözünürlük birimi alır veya ayarlar.

public TiffResolutionUnits ResolutionUnit { get; set; }

Mülkiyet Değer

TiffResolutionUnits

RowsPerStrip

Alın ya da çizgiyi çizgiye ayarlayın.

public uint RowsPerStrip { get; set; }

Mülkiyet Değer

uint

SampleFormat

Örnek formatını alır veya ayarlar.

public TiffSampleFormats[] SampleFormat { get; set; }

Mülkiyet Değer

TiffSampleFormats […]

Exceptions

ArgumentNullException

Değer

ArgumentOutOfRangeException

değer;Array uzunluğu, piksel sayısı başına örneklere uygun olmalıdır.

SamplesPerPixel

Bu özellik değerini değiştirmek için Aspose.Imaging.ImageOptions.TiffOptions.BitsPerSample özellik setini kullanın.

public ushort SamplesPerPixel { get; }

Mülkiyet Değer

ushort

ScannerManufacturer

Scan üreticisini alır veya ayarlar.

public string ScannerManufacturer { get; set; }

Mülkiyet Değer

string

ScannerModel

Scanner modelini alır veya ayarlar.

public string ScannerModel { get; set; }

Mülkiyet Değer

string

SmaxSampleValue

Maksimum örnek değerini alır veya ayarlar. değer, örnek verileri (Byte, Short veya Long tipi) en iyi eşleşen bir alan türüne sahiptir.

public uint[] SmaxSampleValue { get; set; }

Mülkiyet Değer

uint […]

SminSampleValue

Örnek değerini alır veya ayarlar. değer, örnek verilerine en iyi eşleşen bir alan türüne sahiptir (Byte, Short veya Long türü).

public uint[] SminSampleValue { get; set; }

Mülkiyet Değer

uint […]

SoftwareType

Yazılım türünü alır veya ayarlar.

public string SoftwareType { get; set; }

Mülkiyet Değer

string

StripByteCounts

Alın ya da çizgi byte sayın.

public ulong[] StripByteCounts { get; set; }

Mülkiyet Değer

ulong […]

StripOffsets

Alın ya da çizgiyi ayarlayın.

public ulong[] StripOffsets { get; set; }

Mülkiyet Değer

ulong […]

SubFileType

Bu alt dosyada yer alan veri türünün genel bir göstergesini alır veya koyar.

public TiffNewSubFileTypes SubFileType { get; set; }

Mülkiyet Değer

TiffNewSubFileTypes

TagCount

Etiket sayımını alır.

public int TagCount { get; }

Mülkiyet Değer

int

Tags

Alın ya da etiketleri koyun.

public TiffDataType[] Tags { get; set; }

Mülkiyet Değer

TiffDataType […]

TargetPrinter

Hedef yazıcıyı alır veya ayarlar.

public string TargetPrinter { get; set; }

Mülkiyet Değer

string

Threshholding

Alın ya da tıraş yapın.

public TiffThresholds Threshholding { get; set; }

Mülkiyet Değer

TiffThresholds

TileByteCounts

Tile byte sayısını alır veya ayarlar.

public ulong[] TileByteCounts { get; set; }

Mülkiyet Değer

ulong […]

TileLength

Gets ot tile uzunluğunu ayarlar.

public uint TileLength { get; set; }

Mülkiyet Değer

uint

TileOffsets

Alın ya da tile offsetleri yerleştirin.

public ulong[] TileOffsets { get; set; }

Mülkiyet Değer

ulong […]

TileWidth

Gets ot tile genişliği ayarlar.

public uint TileWidth { get; set; }

Mülkiyet Değer

uint

TotalPages

Toplam sayfalar alınır.

public ushort TotalPages { get; }

Mülkiyet Değer

ushort

ValidTagCount

Bu toplam etiket sayısı değil, muhafaza edilebilecek etiket sayısıdır.

public int ValidTagCount { get; }

Mülkiyet Değer

int

Yazar XP

Windows Explorer tarafından kullanılan görüntü yazarı alır veya ayarlar.

public string XPAuthor { get; set; }

Mülkiyet Değer

string

XPYorumlar

Windows Explorer tarafından kullanılan görüntü üzerinde yorum alır veya koyar.

public string XPComment { get; set; }

Mülkiyet Değer

string

XPKeywords Hakkında

Windows Explorer tarafından kullanılan bir konu görüntüsü alır veya ayarlar.

public string XPKeywords { get; set; }

Mülkiyet Değer

string

XPSubject Hakkında

Windows Explorer tarafından kullanılan görüntü hakkında bilgi alır veya ayarlar.

public string XPSubject { get; set; }

Mülkiyet Değer

string

xptitle

Windows Explorer tarafından kullanılan görüntü hakkında bilgi alır veya ayarlar.

public string XPTitle { get; set; }

Mülkiyet Değer

string

Xposition

X pozisyonunu alır veya ayarlar.

public TiffRational Xposition { get; set; }

Mülkiyet Değer

TiffRational

Xresolution

x çözünürlüğünü alır veya ayarlar.

public TiffRational Xresolution { get; set; }

Mülkiyet Değer

TiffRational

YCbCrEfektörler

YCbCrCoefficients’i alır veya ayarlar.

public TiffRational[] YCbCrCoefficients { get; set; }

Mülkiyet Değer

TiffRational […]

Exceptions

TiffImageException

Rational Coefficient değerlerinin geçersiz sayısı; 3 ile eşit olmalıdır.

ArgumentNullException

Değer

YCbCrDüzenle

YCbCr fotometrik için alt örnekleme faktörlerini alır veya ayarlar.

public ushort[] YCbCrSubsampling { get; set; }

Mülkiyet Değer

ushort […]

Examples

Bu örnek, çeşitli seçenekleri kullanarak TIFF biçiminde bir raster görüntüsünü nasıl kaydeteceğinizi gösterir.

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

                                                                                                  Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                  // Set 8 bits for each color component.
                                                                                                  saveOptions.BitsPerSample = new ushort[] { 8, 8, 8 };

                                                                                                  // Set the Big Endian byte order (Motorola)
                                                                                                  saveOptions.ByteOrder = Aspose.Imaging.FileFormats.Tiff.Enums.TiffByteOrder.BigEndian;

                                                                                                  // Set the LZW compression.
                                                                                                  saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Lzw;

                                                                                                  // Allow to reduce the size of continuous-tone images.
                                                                                                  // Currently this field is used only with LZW encoding because LZW is probably the only TIFF encoding scheme
                                                                                                  // that benefits significantly from a predictor step.
                                                                                                  saveOptions.Predictor = Imaging.FileFormats.Tiff.Enums.TiffPredictor.Horizontal;

                                                                                                  // Set the RGB color model.
                                                                                                  saveOptions.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Rgb;

                                                                                                  // For YCbCr, you can use one of the following choices:
                                                                                                  // YCbCrSubSampling field   JPEG sampling factors
                                                                                                  // ----------------------------------------------
                                                                                                  // 1,1                      1x1, 1x1, 1x1
                                                                                                  // 2,1                      2x1, 1x1, 1x1
                                                                                                  // 2,2(default value)       2x2, 1x1, 1x1
                                                                                                  // saveOptions.YCbCrSubsampling = new ushort[] { 2, 2 };

                                                                                                  // All color components will be stored within a singel plane.
                                                                                                  saveOptions.PlanarConfiguration = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPlanarConfigs.Contiguous;

                                                                                                  // Create a TIFF Frame of 100x100 px.
                                                                                                  using (Aspose.Imaging.Image image = new Aspose.Imaging.FileFormats.Bmp.BmpImage(100, 100))
                                                                                                  {
                                                                                                      // 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(image.Width, image.Height),
                                                                                                              Aspose.Imaging.Color.Blue,
                                                                                                              Aspose.Imaging.Color.Yellow);

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

                                                                                                      image.Save(dir + "output.tif", saveOptions);
                                                                                                  }

Exceptions

TiffImageException

YCbCrSubsampling alanı iki değer içermelidir.

ArgumentNullException

Değer

Yposition

Y pozisyonu alır ya da yerleştirir.

public TiffRational Yposition { get; set; }

Mülkiyet Değer

TiffRational

Yresolution

Çözünürlüğünü alır ya da yapar.

public TiffRational Yresolution { get; set; }

Mülkiyet Değer

TiffRational

Methods

AddTag(TiffDataType)

Yeni bir etiket ekleyin.

public void AddTag(TiffDataType tagToAdd)

Parameters

tagToAdd TiffDataType

eklemek için çerçeve.

AddTags(TiffDataType[])

etiketleri ekleyin.

public void AddTags(TiffDataType[] tagsToAdd)

Parameters

tagsToAdd TiffDataType […]

eklemek için etiketler.

Clone()

Bu durumun klonlanması.

public override ImageOptionsBase Clone()

Returns

ImageOptionsBase

Derin bir klon döndü.

GetTagByType(TiffTags)

Örneğin, etiket türüne göre alınır.

public TiffDataType GetTagByType(TiffTags tagKey)

Parameters

tagKey TiffTags

Etiket anahtarı

Returns

TiffDataType

Eğer mevcutsa veya başka türlü sıfırsa etiket istisnası.

GetValidTagsCount(TiffDataType[])

Geçerli etiketleri sayın.

public static int GetValidTagsCount(TiffDataType[] tags)

Parameters

tags TiffDataType […]

Etiketleri doğrulamak için.

Returns

int

Geçerli etiketleri sayın.

IsTagPresent(TiffTags)

Etiketin seçeneklerde var olup olmadığını belirler.

public bool IsTagPresent(TiffTags tag)

Parameters

tag TiffTags

Tag id kontrol etmek için.

Returns

bool

‘gerçek’ eğer etiket mevcutsa; aksi takdirde ‘yanlış’.

RemoveTag(TiffTags)

etiketini kaldırın.

public bool RemoveTag(TiffTags tag)

Parameters

tag TiffTags

Etiket kaldırmak için.

Returns

bool

Eğer başarılı bir şekilde kaldırılırsa

RemoveTags(Tifre Tifre[])

Etiketleri kaldırın.

public bool RemoveTags(params TiffTags[] tags)

Parameters

tags TiffTags […]

Etiketleri kaldırmak için.

Returns

bool

doğru Etiket koleksiyonu boyutu değişir.

Validate()

Seçeneklerin etiketlerin geçerli bir kombinasyonu olup olmadığını doğrulamak

public void Validate()
 Türkçe