Class TiffImage

Class TiffImage

이름 공간 : Aspose.Imaging.FileFormats.Tiff 모임: Aspose.Imaging.dll (25.4.0)

프로세스 태그 이미지 파일 형식 (TIFF) 우리의 API, 제공다양한 솔루션 및 고급 편집 능력에 대한 포괄적 인 지원EXIF 데이터 조작 및 알파 채널과 같은 스캔 된 이미지의 각도를 정상화,재구성, 그레이 스케일로 변환 및 필터, 가마 수정 및 이미지를 적용매개 변수 조정 쉽습니다. 멀티 프레임 TIFF 파일을 쉽게 처리,그래픽 경로를 만들고, 모양을 추가하고, 쉽게 다른 형식으로 이미지를 저장합니다.

[JsonObject(MemberSerialization.OptIn)]
public class TiffImage : RasterCachedMultipageImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IMultipageImageExt, IMultipageImage, IHasExifData, IHasXmpData, IHasMetadata

Inheritance

object DisposableObject DataStreamSupporter Image RasterImage RasterCachedImage RasterCachedMultipageImage TiffImage

Derived

BigTiffImage

Implements

IDisposable , IObjectWithBounds , IRasterImageArgb32PixelLoader , IRasterImageRawDataLoader , IMultipageImageExt , IMultipageImage , IHasExifData , IHasXmpData , IHasMetadata

상속 회원들

RasterCachedMultipageImage.AdjustBrightness(int) , RasterCachedMultipageImage.AdjustContrast(float) , RasterCachedMultipageImage.AdjustGamma(float, float, float) , RasterCachedMultipageImage.AdjustGamma(float) , RasterCachedMultipageImage.Blend(Point, RasterImage, Rectangle, byte) , RasterCachedMultipageImage.BinarizeFixed(byte) , RasterCachedMultipageImage.BinarizeBradley(double, int) , RasterCachedMultipageImage.BinarizeBradley(double) , RasterCachedMultipageImage.BinarizeOtsu() , RasterCachedMultipageImage.Crop(Rectangle) , RasterCachedMultipageImage.Crop(int, int, int, int) , RasterCachedMultipageImage.Dither(DitheringMethod, int, IColorPalette) , RasterCachedMultipageImage.Grayscale() , RasterCachedMultipageImage.NormalizeHistogram() , RasterCachedMultipageImage.Rotate(float, bool, Color) , RasterCachedMultipageImage.RotateFlip(RotateFlipType) , RasterCachedMultipageImage.RotateFlipAll(RotateFlipType) , RasterCachedMultipageImage.Resize(int, int, ResizeType) , RasterCachedMultipageImage.Resize(int, int, ImageResizeSettings) , RasterCachedMultipageImage.ResizeWidthProportionally(int, ResizeType) , RasterCachedMultipageImage.ResizeHeightProportionally(int, ResizeType) , RasterCachedMultipageImage.ReplaceColor(int, byte, int) , RasterCachedMultipageImage.ReplaceNonTransparentColors(int) , RasterCachedMultipageImage.Filter(Rectangle, FilterOptionsBase) , RasterCachedMultipageImage.NormalizeAngle(bool, Color) , RasterCachedMultipageImage.CacheData() , RasterCachedMultipageImage.ReleaseManagedResources() , RasterCachedMultipageImage.ResizeMain(int, int, ResizeType) , RasterCachedMultipageImage.RotateFlipMain(RotateFlipType) , RasterCachedMultipageImage.CropMain(int, int, int, int) , RasterCachedMultipageImage.SavePixelsInternalMain(Rectangle, int[]) , RasterCachedMultipageImage.CanDoAdjustments() , RasterCachedMultipageImage.GetPagesAsEnumerable() , RasterCachedMultipageImage.GetSerializedStream(ImageOptionsBase, Rectangle, out int) , RasterCachedMultipageImage.Height , RasterCachedMultipageImage.Width , RasterCachedMultipageImage.BitsPerPixel , RasterCachedMultipageImage.IsCached , RasterCachedMultipageImage.PageCount , RasterCachedMultipageImage.Pages , RasterCachedMultipageImage.HasAlpha , RasterCachedMultipageImage.HasTransparentColor , RasterCachedMultipageImage.ImageOpacity , RasterCachedMultipageImage.BackgroundColor , RasterCachedMultipageImage.XmpData , RasterCachedMultipageImage.PageExportingAction , RasterCachedImage.CacheData() , RasterCachedImage.Blend(Point, RasterImage, Rectangle, byte) , RasterCachedImage.Resize(int, int, ResizeType) , RasterCachedImage.Resize(int, int, ImageResizeSettings) , RasterCachedImage.RotateFlip(RotateFlipType) , RasterCachedImage.Rotate(float, bool, Color) , RasterCachedImage.Crop(Rectangle) , RasterCachedImage.Dither(DitheringMethod, int, IColorPalette) , RasterCachedImage.Grayscale() , RasterCachedImage.NormalizeHistogram() , RasterCachedImage.BinarizeFixed(byte) , RasterCachedImage.BinarizeOtsu() , RasterCachedImage.BinarizeBradley(double, int) , RasterCachedImage.BinarizeBradley(double) , RasterCachedImage.AdjustBrightness(int) , RasterCachedImage.AdjustContrast(float) , RasterCachedImage.AdjustGamma(float, float, float) , RasterCachedImage.AdjustGamma(float) , RasterCachedImage.OnCached() , RasterCachedImage.OnPaletteChanged(IColorPalette, IColorPalette) , RasterCachedImage.IsCached , RasterImage.xmpData , RasterImage.RemoveMetadata() , RasterImage.Save(Stream, ImageOptionsBase, Rectangle) , RasterImage.GetModifyDate(bool) , RasterImage.Dither(DitheringMethod, int) , RasterImage.Dither(DitheringMethod, int, IColorPalette) , RasterImage.GetDefaultPixels(Rectangle, IPartialArgb32PixelLoader) , RasterImage.GetDefaultRawData(Rectangle, IPartialRawDataLoader, RawDataSettings) , RasterImage.GetDefaultArgb32Pixels(Rectangle) , RasterImage.GetDefaultRawData(Rectangle, RawDataSettings) , RasterImage.GetArgb32Pixel(int, int) , RasterImage.GetPixel(int, int) , RasterImage.SetArgb32Pixel(int, int, int) , RasterImage.SetPixel(int, int, Color) , RasterImage.ReadScanLine(int) , RasterImage.ReadArgb32ScanLine(int) , RasterImage.WriteScanLine(int, Color[]) , RasterImage.WriteArgb32ScanLine(int, int[]) , RasterImage.LoadPartialArgb32Pixels(Rectangle, IPartialArgb32PixelLoader) , RasterImage.LoadPartialPixels(Rectangle, IPartialPixelLoader) , RasterImage.LoadArgb32Pixels(Rectangle) , RasterImage.LoadArgb64Pixels(Rectangle) , RasterImage.LoadPartialArgb64Pixels(Rectangle, IPartialArgb64PixelLoader) , RasterImage.LoadPixels(Rectangle) , RasterImage.LoadCmykPixels(Rectangle) , RasterImage.LoadCmyk32Pixels(Rectangle) , RasterImage.LoadRawData(Rectangle, RawDataSettings, IPartialRawDataLoader) , RasterImage.LoadRawData(Rectangle, Rectangle, RawDataSettings, IPartialRawDataLoader) , RasterImage.SaveRawData(byte[], int, Rectangle, RawDataSettings) , RasterImage.SaveArgb32Pixels(Rectangle, int[]) , RasterImage.SavePixels(Rectangle, Color[]) , RasterImage.SaveCmykPixels(Rectangle, CmykColor[]) , RasterImage.SaveCmyk32Pixels(Rectangle, int[]) , RasterImage.SetResolution(double, double) , RasterImage.SetPalette(IColorPalette, bool) , RasterImage.Resize(int, int, ImageResizeSettings) , RasterImage.Rotate(float, bool, Color) , RasterImage.Rotate(float) , RasterImage.BinarizeFixed(byte) , RasterImage.BinarizeOtsu() , RasterImage.BinarizeBradley(double) , RasterImage.BinarizeBradley(double, int) , RasterImage.Blend(Point, RasterImage, Rectangle, byte) , RasterImage.Blend(Point, RasterImage, byte) , RasterImage.Grayscale() , RasterImage.NormalizeHistogram() , RasterImage.AdjustBrightness(int) , RasterImage.AdjustContrast(float) , RasterImage.AdjustGamma(float, float, float) , RasterImage.AdjustGamma(float) , RasterImage.GetSkewAngle() , RasterImage.NormalizeAngle() , RasterImage.NormalizeAngle(bool, Color) , RasterImage.Filter(Rectangle, FilterOptionsBase) , RasterImage.ReplaceColor(Color, byte, Color) , RasterImage.ReplaceColor(int, byte, int) , RasterImage.ReplaceNonTransparentColors(Color) , RasterImage.ReplaceNonTransparentColors(int) , RasterImage.ToBitmap() , RasterImage.ReleaseManagedResources() , RasterImage.UpdateMetadata() , RasterImage.UpdateDimensions(int, int) , RasterImage.PremultiplyComponents , RasterImage.UseRawData , RasterImage.UpdateXmpData , RasterImage.XmpData , RasterImage.RawIndexedColorConverter , RasterImage.RawCustomColorConverter , RasterImage.RawFallbackIndex , RasterImage.RawDataSettings , RasterImage.UsePalette , RasterImage.RawDataFormat , RasterImage.RawLineSize , RasterImage.IsRawDataAvailable , RasterImage.HorizontalResolution , RasterImage.VerticalResolution , RasterImage.HasTransparentColor , RasterImage.HasAlpha , RasterImage.TransparentColor , RasterImage.ImageOpacity , RasterImage.DataLoader , Image.CanLoad(string) , Image.CanLoad(string, LoadOptions) , Image.CanLoad(Stream) , Image.CanLoad(Stream, LoadOptions) , Image.Create(ImageOptionsBase, int, int) , Image.Create(Image[]) , Image.Create(MultipageCreateOptions) , Image.Create(string[], bool) , Image.Create(string[]) , Image.Create(Image[], bool) , Image.GetFileFormat(string) , Image.GetFileFormat(Stream) , Image.GetFittingRectangle(Rectangle, int, int) , Image.GetFittingRectangle(Rectangle, int[], int, int) , Image.Load(string, LoadOptions) , Image.Load(string) , Image.Load(Stream, LoadOptions) , Image.Load(Stream) , Image.GetProportionalWidth(int, int, int) , Image.GetProportionalHeight(int, int, int) , Image.RemoveMetadata() , Image.CanSave(ImageOptionsBase) , Image.Resize(int, int) , Image.Resize(int, int, ResizeType) , Image.Resize(int, int, ImageResizeSettings) , Image.GetDefaultOptions(object[]) , Image.GetOriginalOptions() , Image.ResizeWidthProportionally(int) , Image.ResizeHeightProportionally(int) , Image.ResizeWidthProportionally(int, ResizeType) , Image.ResizeHeightProportionally(int, ResizeType) , Image.ResizeWidthProportionally(int, ImageResizeSettings) , Image.ResizeHeightProportionally(int, ImageResizeSettings) , Image.RotateFlip(RotateFlipType) , Image.Rotate(float) , Image.Crop(Rectangle) , Image.Crop(int, int, int, int) , Image.Save() , Image.Save(string) , Image.Save(string, ImageOptionsBase) , Image.Save(string, ImageOptionsBase, Rectangle) , Image.Save(Stream, ImageOptionsBase) , Image.Save(Stream, ImageOptionsBase, Rectangle) , Image.GetSerializedStream(ImageOptionsBase, Rectangle, out int) , Image.SetPalette(IColorPalette, bool) , Image.UpdateContainer(Image) , Image.GetCanNotSaveMessage(ImageOptionsBase) , Image.GetFitRectangle(Rectangle) , Image.GetImage2Export(ImageOptionsBase, Rectangle, IImageExporter) , Image.GetFitRectangle(Rectangle, int[]) , Image.OnPaletteChanged(IColorPalette, IColorPalette) , Image.OnPaletteChanging(IColorPalette, IColorPalette) , Image.ReleaseManagedResources() , Image.BitsPerPixel , Image.Bounds , Image.Container , Image.Height , Image.Palette , Image.UsePalette , Image.Size , Image.Width , Image.InterruptMonitor , Image.BufferSizeHint , Image.AutoAdjustPalette , Image.HasBackgroundColor , Image.FileFormat , Image.BackgroundColor , DataStreamSupporter.timeout , DataStreamSupporter.CacheData() , DataStreamSupporter.Save() , DataStreamSupporter.Save(Stream) , DataStreamSupporter.Save(string) , DataStreamSupporter.Save(string, bool) , DataStreamSupporter.SaveData(Stream) , DataStreamSupporter.ReleaseManagedResources() , DataStreamSupporter.OnDataStreamContainerChanging(StreamContainer) , DataStreamSupporter.DataStreamContainer , DataStreamSupporter.IsCached , 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

TIFF 이미지에서 Path Resources에서 Graphics Path를 만드십시오.

using (var image = (TiffImage)Image.Load("Bottle.tif"))
                                                                  {
                                                                      // Create the GraphicsPath using PathResources from TIFF image
                                                                      var graphicsPath = PathResourceConverter.ToGraphicsPath(image.ActiveFrame.PathResources.ToArray(), image.ActiveFrame.Size);
                                                                      var graphics = new Graphics(image);

                                                                      // Draw red line and save the image
                                                                      graphics.DrawPath(new Pen(Color.Red, 10), graphicsPath);
                                                                      image.Save("BottleWithRedBorder.tif");
                                                                  }

그래픽 경로를 사용하여 Path Resources를 만드십시오.

static void Main(string[] args)
                                                     {
                                                         using (var image = (TiffImage)Image.Load("Bottle.tif"))
                                                         {
                                                             // Create rectangular Figure for GraphicsPath
                                                             var figure = new Figure();
                                                             figure.AddShape(CreateBezierShape(100f, 100f, 500f, 100f, 500f, 1000f, 100f, 1000f));

                                                             // Create GraphicsPath using our Figure
                                                             var graphicsPath = new GraphicsPath();
                                                             graphicsPath.AddFigure(figure);

                                                             // Set PathResources using GraphicsPath
                                                             var pathResouze = PathResourceConverter.FromGraphicsPath(graphicsPath, image.Size);
                                                             image.ActiveFrame.PathResources = new List<pathresource>(pathResouze);

                                                             // Save the image
                                                             image.Save("BottleWithRectanglePath.tif");
                                                         }
                                                     }

                                                     private static BezierShape CreateBezierShape(params float[] coordinates)
                                                     {
                                                         var bezierPoints = CoordinatesToBezierPoints(coordinates).ToArray();
                                                         return new BezierShape(bezierPoints, true);
                                                     }

                                                     private static IEnumerable<pointf> CoordinatesToBezierPoints(float[] coordinates)
                                                     {
                                                         for (var coordinateIndex = 0; coordinateIndex &lt; coordinates.Length; coordinateIndex += 2)
                                                             for (var index = 0; index &lt; 3; index++)
                                                                 yield return new PointF(coordinates[coordinateIndex], coordinates[coordinateIndex + 1]);
                                                     }</pointf></pathresource>

Constructors

TiffImage(TiffFrame)

Aspose.Imaging.FileFormats.Tiff.TiffImage 클래스의 새로운 개체를 시작하여프레임 매개 변수.이 건축기는 TiffImage의 창조를 촉진합니다.예를 들어, 개발자가 로드되거나 처리되는 프레임을 지정할 수 있도록,그들의 응용 프로그램 내에서 Tiff 이미지 처리 작업을 단순화합니다.

public TiffImage(TiffFrame frame)

Parameters

frame TiffFrame

티프 프레임은 이미지와 함께 시작할 수 있습니다.

Examples

이 예제는 스크래치에서 TIFF 이미지를 만드는 방법을 보여주고 파일에 저장합니다.

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

Exceptions

ArgumentNullException

Tiff frame’는 텅 비어 있지 않습니다.

TiffImage(TiffFrame[])

Aspose.Imaging.FileFormats.Tiff.TiffImage 클래스의 새로운 예를 만드십시오.프레임은 매개 변수입니다.이 건축기는 TiffImage의 시작을 가능하게합니다.다중 프레임을 가진 개체, 효율적인 처리 및 처리 촉진TIFF 이미지 추적은 소프트웨어 응용 프로그램 내에서.

public TiffImage(TiffFrame[] frames)

Parameters

frames TiffFrame [ ] [ [ ]

그 프레임을

Examples

이 예제는 2 프레임을 가진 TIFF 이미지를 만드는 방법을 보여주고 파일에 저장합니다.

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

Exceptions

ArgumentNullException

프레임

Properties

ActiveFrame

활성 프레임을 무조건 관리하고, 역동적 인 항해를 촉진하고,지정된 맥락 내에서 조작.당신의 응용 프로그램을 상호 작용하도록 권한효율적으로 멀티미디어 콘텐츠를 사용하여 사용자 참여와 생산성을 향상시킵니다.

public TiffFrame ActiveFrame { get; set; }

부동산 가치

TiffFrame

Examples

다음 예제는 각각의 래스터 이미지에서 TIFF 조립을 구성하는 방법을 보여줍니다.

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 &lt;= 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();
                                                                                                     }

ByteOrder

TIFF 파일에 대한 바이트 명령을 무조건 조합하여 정확한 통제를 보장합니다.데이터 해석: 응용 프로그램에 적응할 수 있는 유연성을 갖추고 있습니다.다양한 파일 사양, 데이터 처리의 호환성과 효율성을 향상시킵니다.

public TiffByteOrder ByteOrder { get; set; }

부동산 가치

TiffByteOrder

ExifData

활성 프레임과 관련된 EXIF 데이터에 액세스하거나 변경하십시오.이미지 메타 데이터에 대한 정확한 제어. 응용 프로그램의 능력을 향상시켜이 기능을 통합하여 정확한 보존 및 사용자 정의를 보장합니다.필수 이미지 정보

public ExifData ExifData { get; set; }

부동산 가치

ExifData

FileFormat

이미지와 관련된 파일 형식 값을 복구합니다.이 속성은이미지 메타 데이터 복구의 중요한 측면, 소프트웨어 응용 프로그램을 허용이미지 데이터 형식을 효율적으로 식별하고 해석합니다.

public override FileFormat FileFormat { get; }

부동산 가치

FileFormat

Frames

Aspose.Imaging.FileFormats.Tiff.TiffFrame 사례의 일련을 복구하여 포괄적 인TIFF 이미지 내의 개별 프레임에 대한 접근 및 조작.이 레이어의 힘은 이미지 처리 작업 흐름을 단순화하고 정확성을 보장합니다.시각적 콘텐츠의 관리 및 최적화.

public TiffFrame[] Frames { get; }

부동산 가치

TiffFrame [ ] [ [ ]

Examples

다음 예제는 각각의 래스터 이미지에서 TIFF 조립을 구성하는 방법을 보여줍니다.

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 &lt;= 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();
                                                                                                     }

HasAlpha

이미지에 알파 채널이 있는지 확인하여 중요한 정보를 제공합니다.렌더링 및 컴포팅 작업을 위해.이 기능을 통합하여 최적화시각적 처리 작업 흐름, 정확한 표현 및 조작을 보장투명한 요소

public override bool HasAlpha { get; }

부동산 가치

bool

Examples

다음 예제는 TIFF 이미지를 업로드하고 원료 데이터 형식 및 알파 채널에 대한 정보를 인쇄합니다.

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

                                                                                                                   string fileName = dir + "sample.tif";
                                                                                                                   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(fileName))
                                                                                                                   {
                                                                                                                       Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                       // If the active TIFF frame has alpha channel, then the entire TIFF image is considered to have alpha channel.
                                                                                                                       System.Console.WriteLine("ImageFile={0}, FileFormat={1}, HasAlpha={2}", fileName, tiffImage.RawDataFormat, tiffImage.HasAlpha);

                                                                                                                       int i = 0;
                                                                                                                       foreach (Aspose.Imaging.FileFormats.Tiff.TiffFrame frame in tiffImage.Frames)
                                                                                                                       {
                                                                                                                           System.Console.WriteLine("Frame={0}, FileFormat={1}, HasAlpha={2}", ++i, frame.RawDataFormat, frame.HasAlpha);
                                                                                                                       }
                                                                                                                   }

                                                                                                                   // The output may look like this:
                                                                                                                   // ImageFile=c:\temp\sample.tif, FileFormat=RgbIndexed1Bpp, used channels: 1, HasAlpha=False
                                                                                                                   // Frame=1, FileFormat=RgbIndexed1Bpp, used channels: 1, HasAlpha=False
                                                                                                                   // Frame=2, FileFormat=RgbIndexed1Bpp, used channels: 1, HasAlpha=False

HorizontalResolution

지정된 Aspose.Imaging.Image의 수평 해상도를 픽셀로 복구합니다.인치 당, 정확한 조정 및 수행 능력을 촉진합니다.필수 이미지 메타데이터는 노력없이, 유연한 이미지 처리를 가능하게합니다.사용자 경험을 향상시키는 작업 흐름.

public override double HorizontalResolution { get; set; }

부동산 가치

double

Examples

다음 예제는 TIFF 이미지의 수평/수직 해상도를 설정하는 방법을 보여줍니다.

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                     // Get horizontal and vertical resolution of the TiffImage.
                                                                                                     double horizontalResolution = tiffImage.HorizontalResolution;
                                                                                                     double verticalResolution = tiffImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         tiffImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", tiffImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", tiffImage.VerticalResolution);
                                                                                                     }
                                                                                                 }

Remarks

기본적으로 이 값은 항상 96이기 때문에 다른 플랫폼이 스크린 해상도를 반환 할 수 없습니다.SetResolution 방법을 사용하여 하나의 전화에서 두 해상도 값을 업데이트 할 수 있습니다.

PageCount

지정된 문서 내의 전체 페이지 수를 복구하고,효율적인 탐색 및 멀티 페이지 콘텐츠 관리.이를 포함사용자 경험을 향상시키기위한 기능, 무제한 액세스를 허용포괄적 인 문서 구조.

public override int PageCount { get; }

부동산 가치

int

Pages

문서의 페이지에 무조건 액세스하여 역동적 인 탐색 및컨텐츠 구조 내의 조작.당신의 응용 프로그램을 효율적으로 강화개별 페이지에 액세스하여 문서 처리를 촉진하고,사용자 상호 작용을 강화합니다.

public override Image[] Pages { get; }

부동산 가치

Image [ ] [ [ ]

PremultiplyComponents

구성 요소가 사전 복제가 필요한지 지정하여 효율적인 처리를 보장합니다.시각적 요소.이 재산을 포장함으로써 rendering 프로세스를 향상시키고,최적화된 성능을 위해 그래픽 작업 흐름을 단순화합니다.

public override bool PremultiplyComponents { get; set; }

부동산 가치

bool

Examples

다음 예제는 새로운 TIFF 이미지를 생성하고, 지정된 반 투명한 픽셀을 저장하고, 그 후에 그 픽셀을 충전하고, 예상 형태로 최종 색상을 얻습니다.

int imageWidth = 3;
                                                                                                                                                                                int imageHeight = 2;

                                                                                                                                                                                Aspose.Imaging.Color[] colors = new Aspose.Imaging.Color[]
                                                                                                                                                                                {
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 255, 0, 0),
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 0, 255, 0),
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 0, 0, 255),
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 255, 255, 0),
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 255, 0, 255),
                                                                                                                                                                                    Aspose.Imaging.Color.FromArgb(127, 0, 255, 255),
                                                                                                                                                                                };

                                                                                                                                                                                Aspose.Imaging.ImageOptions.TiffOptions createOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.TiffDeflateRgba);
                                                                                                                                                                                createOptions.Source = new Aspose.Imaging.Sources.StreamSource(new System.IO.MemoryStream(), true);

                                                                                                                                                                                using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Create(createOptions, imageWidth, imageHeight))
                                                                                                                                                                                {
                                                                                                                                                                                    // Save pixels for the whole image.
                                                                                                                                                                                    image.SavePixels(image.Bounds, colors);

                                                                                                                                                                                    // The pixels are stored in the original image in the non-premultiplied form.
                                                                                                                                                                                    // Need to specify the corresponding option explicitly to obtain premultiplied color components.
                                                                                                                                                                                    // The premultiplied color components are calculated by the formulas:
                                                                                                                                                                                    // red = original_red * alpha / 255;
                                                                                                                                                                                    // green = original_green * alpha / 255;
                                                                                                                                                                                    // blue = original_blue * alpha / 255;
                                                                                                                                                                                    image.PremultiplyComponents = true;
                                                                                                                                                                                    Aspose.Imaging.Color[] premultipliedColors = image.LoadPixels(image.Bounds);

                                                                                                                                                                                    for (int i = 0; i &lt; colors.Length; i++)
                                                                                                                                                                                    {
                                                                                                                                                                                        System.Console.WriteLine("Original color: {0}", colors[i].ToString());
                                                                                                                                                                                        System.Console.WriteLine("Premultiplied color: {0}", premultipliedColors[i].ToString());
                                                                                                                                                                                    }
                                                                                                                                                                                }

                                                                                                                                                                                //The output will look like this:
                                                                                                                                                                                //Original color: Color [A=127, R=255, G=0, B=0]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=127, G=0, B=0]
                                                                                                                                                                                //Original color: Color [A=127, R=0, G=255, B=0]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=0, G=127, B=0]
                                                                                                                                                                                //Original color: Color [A=127, R=0, G=0, B=255]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=0, G=0, B=127]
                                                                                                                                                                                //Original color: Color [A=127, R=255, G=255, B=0]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=127, G=127, B=0]
                                                                                                                                                                                //Original color: Color [A=127, R=255, G=0, B=255]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=127, G=0, B=127]
                                                                                                                                                                                //Original color: Color [A=127, R=0, G=255, B=255]
                                                                                                                                                                                //Premultiplied color: Color [A=127, R=0, G=127, B=127]

VerticalResolution

지정된 Aspose.Imaging.Image의 수직 해상도에 액세스하십시오.인치, 정확한 조정 및 최적화를 가능하게합니다.이미지 데이터는 이미지 처리 작업 흐름을 단순화하기 위해 노력하지 않고,귀하의 응용 프로그램에서 우수한 품질과 성능.

public override double VerticalResolution { get; set; }

부동산 가치

double

Examples

다음 예제는 TIFF 이미지의 수평/수직 해상도를 설정하는 방법을 보여줍니다.

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                     // Get horizontal and vertical resolution of the TiffImage.
                                                                                                     double horizontalResolution = tiffImage.HorizontalResolution;
                                                                                                     double verticalResolution = tiffImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         tiffImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", tiffImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", tiffImage.VerticalResolution);
                                                                                                     }
                                                                                                 }

Remarks

기본적으로 이 값은 항상 96이기 때문에 다른 플랫폼이 스크린 해상도를 반환 할 수 없습니다.SetResolution 방법을 사용하여 하나의 전화에서 두 해상도 값을 업데이트 할 수 있습니다.

Methods

Add(TiffImage)

지정된 이미지의 프레임을 현재 프레임에 무조건 추가하십시오.그들의 콘텐츠를 강화하고 구성 유연성을 향상시킵니다.이 방법은 프레임 관리 및 당신의 내부의 조작을 촉진합니다.응용 프로그램, 멀티 프레임 이미지의 효율적인 처리를 촉진.

public void Add(TiffImage image)

Parameters

image TiffImage

출처 이미지 입니다.

AddFrame(TiffFrame)

지정된 프레임을 무조건 이미지에 삽입하여 콘텐츠를 확장합니다.이 방법을 사용하여 이미지 구성 및 관리를 향상시킵니다.응용 프로그램 내에서 멀티 프레임 이미지를 효율적으로 처리할 수 있도록 합니다.

public void AddFrame(TiffFrame frame)

Parameters

frame TiffFrame

프레임을 추가합니다.

Examples

다음 예제는 각각의 래스터 이미지에서 TIFF 조립을 구성하는 방법을 보여줍니다.

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 &lt;= 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();
                                                                                                     }

AddFrames(TiffFrame[])

프레임의 범위를 무조건 이미지에 통합하여 콘텐츠를 풍요롭게하고다양성.이 방법을 사용하여 이미지 구성 및 관리를 향상시킵니다.응용 프로그램 내에서 멀티 프레임 이미지를 효율적으로 처리 할 수 있습니다.

public void AddFrames(TiffFrame[] frames)

Parameters

frames TiffFrame [ ] [ [ ]

프레임은 추가하기 위해

AddPage(RasterImage)

새 페이지를 기존 이미지에 무조건 삽입하여 콘텐츠를 확장합니다.이 방법을 사용하여 문서 구성을 향상시키고관리, 응용 프로그램 내에서 멀티 페이지 이미지를 효율적으로 처리 할 수 있습니다.

public virtual void AddPage(RasterImage page)

Parameters

page RasterImage

추가하는 페이지입니다.

Exceptions

ArgumentNullException

page’ is null.

AdjustBrightness(이트)

이미지에 대한 brightness’ 조정을 실행하여 전체 밝기 수준의 themodification을 허용합니다.이 방법을 이미지 처리 작업 흐름에 포함하여 시각성을 향상시키고 응용 프로그램 내의 시각적 품질의 이미지를 향상시킵니다.

public override void AdjustBrightness(int brightness)

Parameters

brightness int

빛의 가치

Examples

다음 예제는 TIFF 이미지의 밝기 수정을 수행합니다.

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

                                                                                using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                {
                                                                                    Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                    // Set the brightness value. The accepted values of brightness are in the range [-255, 255].
                                                                                    tiffImage.AdjustBrightness(50);
                                                                                    tiffImage.Save(dir + "sample.AdjustBrightness.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                }

AdjustContrast(플로트)

Aspose.Imaging.Image 예제의 대조를 향상시키고,그것의 빛과 어두운 영역 사이의 차이를 강화합니다.기능은 시각적 명확성과 전체 이미지 품질을 향상시킵니다.귀하의 신청서 내에서

public override void AdjustContrast(float contrast)

Parameters

contrast float

대조 값 (내 범위 [-100; 100])

Examples

다음 예제는 TIFF 이미지의 대조 수정을 수행합니다.

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

                                                                              using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                              {
                                                                                  Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                  // Set the contrast value. The accepted values of contrast are in the range [-100f, 100f].
                                                                                  tiffImage.AdjustContrast(50f);
                                                                                  tiffImage.Save(dir + "sample.AdjustContrast.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                              }

AdjustGamma(플로트)

이미지에 게마 수정을 적용하여 픽셀 강도를 조정하여원하는 색상 균형.이 방법을 이미지 처리에 포함작업 흐름은 시각적 품질을 향상시키고 나중에 정확성을 향상시킵니다.귀하의 응용 프로그램 내에서 분석 또는 표시 작업.

public override void AdjustGamma(float gamma)

Parameters

gamma float

빨간색, 녹색 및 파란색 채널에 대한 Gamma

Examples

다음 예제는 TIFF 이미지의 gamma-correction을 수행합니다.

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

                                                                           using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                           {
                                                                               Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                               // Set gamma coefficient for red, green and blue channels.
                                                                               tiffImage.AdjustGamma(2.5f);
                                                                               tiffImage.Save(dir + "sample.AdjustGamma.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                           }

AdjustGamma(해군, 해군, 해군)

붉은 색에 대한 개별 요소를 사용하여 이미지에 게마 수정을 수행,녹색, 그리고 파란 채널, 색상 균형의 얇은 조정을 허용이 방법을 이미지 처리 파이프 라인에 통합하여색상 렌더링을 정확하게 통제하고 내부의 시각적 충성도를 향상시킵니다.당신의 신청

public override void AdjustGamma(float gammaRed, float gammaGreen, float gammaBlue)

Parameters

gammaRed float

붉은 채널 요소를 위한 Gamma

gammaGreen float

녹색 채널 요소를 위한 Gamma

gammaBlue float

파란 채널 요소를 위한 Gamma

Examples

다음 예제는 색상 구성 요소에 다른 요소를 적용하는 TIFF 이미지의 가마 수정을 수행합니다.

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

                                                                                                                                using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                {
                                                                                                                                    Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                    // Set individual gamma coefficients for red, green and blue channels.
                                                                                                                                    tiffImage.AdjustGamma(1.5f, 2.5f, 3.5f);
                                                                                                                                    tiffImage.Save(dir + "sample.AdjustGamma.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                }

AlignResolutions()

AlignResolutions 지원 방법을 구현하여 수평 및 동기화수직 해상도, 이미지 차원에서 일관성을 보장합니다.이 기능해상도를 조화시켜 이미지 처리 작업 흐름을 촉진합니다.매개 변수, 다양한 플랫폼에서 시각 품질과 일관성을 최적화하고장치에 대하여

public void AlignResolutions()

BinarizeBradley(이중, 이중)

Bradley의 적응 한계를 사용하는 이미지에 이중화 구현통합 이미지 경계를 가진 알고리즘.이 접근 방식은 역동적으로 계산이미지의 이웃을 기반으로 한 지역 경계, 적응성을 향상시킵니다다양한 조명 조건을 제공하고 나중에 견고한 분할을 보장합니다.귀하의 신청서 내에서 작업을 처리합니다.

public override void BinarizeBradley(double brightnessDifference, int windowSize)

Parameters

brightnessDifference double

픽셀 사이의 밝기 차이와 픽셀의 s x s 창의 평균 차이이 픽셀 주위에 중점을 둡니다.

windowSize int

이 픽셀 주위에 중점을 둔 픽셀의 s x s 창의 크기

Examples

다음 예제는 Bradley의 적응형 경계 알고리즘과 지정된 창 크기로 TIFF 이미지를 이중화합니다.

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

                                                                                                                                                                                                using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                                                {
                                                                                                                                                                                                    Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                                                                                    // Binarize the image with a brightness difference of 5. The brightness is a difference between a pixel and the average of an 10 x 10 window of pixels centered around this pixel.
                                                                                                                                                                                                    tiffImage.BinarizeBradley(5, 10);
                                                                                                                                                                                                    tiffImage.Save(dir + "sample.BinarizeBradley5_10x10.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                                                }

BinarizeFixed(바이트)

사전 정의 한계를 사용하여 이미지에 이중화를 적용하여 이미지로 변환합니다.분리된 전면 및 배경 지역을 가진 바이너리 이미지.이를 포함분할 및 기능을 촉진하기 위해 이미지 처리 작업 흐름에 방법추출 작업, 이미지 분석의 정확성과 효율성을 향상시키는당신의 신청

public override void BinarizeFixed(byte threshold)

Parameters

threshold byte

픽셀의 해당 회색 값이 픽셀의 한계를 초과하는 경우, 픽셀의 값은 픽셀의 한계를 초과합니다.255은 그에게 맡겨질 것이며, 0은 다르게 맡겨질 것이다.

Examples

다음 예제는 미리 정의된 경계선을 가진 TIFF 이미지를 바이너리화합니다. 바이너리화 된 이미지는 단지 2 가지 색상 - 검정색과 흰색을 포함합니다.

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

                                                                                                                                                using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                {
                                                                                                                                                    Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                                    // Binarize the image with a threshold value of 127.
                                                                                                                                                    // If a corresponding gray value of a pixel is greater than 127, a value of 255 will be assigned to it, 0 otherwise.
                                                                                                                                                    tiffImage.BinarizeFixed(127);
                                                                                                                                                    tiffImage.Save(dir + "sample.BinarizeFixed.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                }

BinarizeOtsu()

Otsu 경계를 사용하여 이미지의 바이너리화를 자동으로 수행합니다.이미지의 히스토그램을 바탕으로 최적의 한계 값을 결정합니다.이 방법은 효과적인 분할을 달성하기 위해 이미지 처리 작업 흐름에 들어갑니다.그리고 기능 추출, 이미지 분석의 정확성과 신뢰성을 향상시키는귀하의 응용 프로그램 내의 작업.

public override void BinarizeOtsu()

Examples

다음 예제는 Otsu 경계를 가진 TIFF 이미지를 바이너리화합니다. 바이너리화 된 이미지는 단지 2 가지 색상 - 검정색과 흰색을 포함합니다.

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

                                                                                                                                         using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                         {
                                                                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                             // Binarize the image with Otsu thresholding.
                                                                                                                                             tiffImage.BinarizeOtsu();
                                                                                                                                             tiffImage.Save(dir + "sample.BinarizeOtsu.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                         }

Crop(Rectangle)

특정 직경 지역을 사용하여 이미지를 재배하여 정확한 선택을 허용합니다.원하는 콘텐츠.이 방법을 이미지 처리 작업 흐름에 통합효과적으로 원치 않는 영역을 제거하고 필수 세부 사항에 초점을 맞추고,전체적인 명확성과 이미지의 구성.

public override void Crop(Rectangle rectangle)

Parameters

rectangle Rectangle

오른쪽 쪽 쪽

Examples

다음 예제는 TIFF 이미지를 재배합니다. 재배 영역은 Aspose.Imaging.Rectangle을 통해 지정됩니다.

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

                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                    {
                                                                                                                        Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                        // Crop the image. The cropping area is the rectangular central area of the image.
                                                                                                                        Aspose.Imaging.Rectangle area = new Aspose.Imaging.Rectangle(tiffImage.Width / 4, tiffImage.Height / 4, tiffImage.Width / 2, tiffImage.Height / 2);
                                                                                                                        tiffImage.Crop(area);

                                                                                                                        // Save the cropped image to PNG
                                                                                                                        tiffImage.Save(dir + "sample.Crop.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                    }

Crop(인트, 인트, 인트)

왼쪽, 오른쪽, 상단에 있는 움직임을 지정함으로써 이미지에 굴곡을 수행하고, 그리고이 방법은 원하는 부분의 정확한 선택을 가능하게합니다.이미지, 원치 않는 영역의 효과적인 제거를 촉진하고 초점을 맞추는필수 콘텐츠.이 기능을 이미지 처리에 통합파이프 라인은 응용 프로그램 내에서 필요한 명확성과 구성을 향상시킵니다.

public override void Crop(int leftShift, int rightShift, int topShift, int bottomShift)

Parameters

leftShift int

왼쪽이 바뀐다.

rightShift int

올바른 변화

topShift int

꼭대기 변동

bottomShift int

밑바닥의 변화

Examples

다음 예제는 TIFF 이미지를 재배합니다. 재배 영역은 왼쪽, 상단, 오른쪽, 바닥 마진을 통해 지정됩니다.

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

                                                                                                                         using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                         {
                                                                                                                             Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                             // Crop again. Set a margin of 10% of the image size.
                                                                                                                             int horizontalMargin = tiffImage.Width / 10;
                                                                                                                             int verticalMargin = tiffImage.Height / 10;
                                                                                                                             tiffImage.Crop(horizontalMargin, horizontalMargin, verticalMargin, verticalMargin);

                                                                                                                             // Save the cropped image to PNG.
                                                                                                                             tiffImage.Save(dir + "sample.Crop.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                         }

Dither(Dithering 방법, int, IColorPalette)

현재 이미지를 실행하여 시각적 품질을 향상시키고 감소시킵니다.이 방법을 이미지 처리 작업 흐름에 통합색상 사이의 더 부드러운 전환을 보장하여 전체 이미지를 향상시킵니다.겉모습과 명확성

public override void Dither(DitheringMethod ditheringMethod, int bitsCount, IColorPalette customPalette)

Parameters

ditheringMethod DitheringMethod

디트리밍 방법을 사용합니다.

bitsCount int

마지막 비트는 디트링을 위해 계산됩니다.

customPalette IColorPalette

Dithering을 위한 특정 팔레트.

Examples

다음 예제는 TIFF 이미지를 업로드하고 다른 팔레트 깊이를 사용하여 경계 및 흐름 디트링을 수행합니다.

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

                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                             {
                                                                                                                                 Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                 // Perform threshold dithering using 4-bit color palette which contains 16 colors.
                                                                                                                                 // The more bits specified the higher quality and the bigger size of the output image.
                                                                                                                                 // Note that only 1-bit, 4-bit and 8-bit palettes are supported at the moment.
                                                                                                                                 tiffImage.Dither(Aspose.Imaging.DitheringMethod.ThresholdDithering, 4, null);

                                                                                                                                 tiffImage.Save(dir + "sample.ThresholdDithering4.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                             }

                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                             {
                                                                                                                                 Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                 // Perform floyd dithering using 1-bit color palette which contains only 2 colors - black and white.
                                                                                                                                 // The more bits specified the higher quality and the bigger size of the output image.
                                                                                                                                 // Note that only 1-bit, 4-bit and 8-bit palettes are supported at the moment.
                                                                                                                                 tiffImage.Dither(Aspose.Imaging.DitheringMethod.FloydSteinbergDithering, 1, null);

                                                                                                                                 tiffImage.Save(dir + "sample.FloydSteinbergDithering1.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                             }

Filter(오른쪽, FilterOptionsBase)

지정된 직경 내에서 콘텐츠를 필터링하여 지정된 이미지를 적용합니다.선택한 지역을 향상시키거나 변경하기 위해 필터를 처리합니다.이 방법을 통합목표 개선을 달성하기 위해 이미지 조작 작업 흐름 또는귀하의 응용 프로그램 내의 변형.

public override void Filter(Rectangle rectangle, FilterOptionsBase options)

Parameters

rectangle Rectangle

오른쪽 쪽 쪽

options FilterOptionsBase

그 옵션들

Examples

다음 예제는 TIFF 이미지에 다양한 유형의 필터를 적용합니다.

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

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a median filter with a rectangle size of 5 to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.MedianFilterOptions(5));
                                                                                      tiffImage.Save(dir + "sample.MedianFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a bilateral smoothing filter with a kernel size of 5 to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.BilateralSmoothingFilterOptions(5));
                                                                                      tiffImage.Save(dir + "sample.BilateralSmoothingFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a Gaussian blur filter with a radius of 5 and a sigma value of 4.0 to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.GaussianBlurFilterOptions(5, 4.0));
                                                                                      tiffImage.Save(dir + "sample.GaussianBlurFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a Gauss-Wiener filter with a radius of 5 and a smooth value of 4.0 to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.GaussWienerFilterOptions(5, 4.0));
                                                                                      tiffImage.Save(dir + "sample.GaussWienerFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a motion wiener filter with a length of 5, a smooth value of 4.0 and an angle of 90.0 degrees to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.MotionWienerFilterOptions(10, 1.0, 90.0));
                                                                                      tiffImage.Save(dir + "sample.MotionWienerFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                  {
                                                                                      Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                      // Apply a sharpen filter with a kernel size of 5 and a sigma value of 4.0 to the entire image.
                                                                                      tiffImage.Filter(tiffImage.Bounds, new Aspose.Imaging.ImageFilters.FilterOptions.SharpenFilterOptions(5, 4.0));
                                                                                      tiffImage.Save(dir + "sample.SharpenFilter.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                  }

GetOriginalOptions()

원본 파일 설정에서 유래한 옵션을 복구하여 시엄없는 옵션을 제공합니다.비트 깊이와 다른 필수 속성과 같은 핵심 매개 변수의 보존이 방법을 사용하여 충성심과 일관성을 유지하십시오.이미지 처리 작업, 불필요한 변경없이 최적의 결과를 보장합니다.예를 들어, 블랙 흰색 PNG 이미지를 픽셀 당 1비트로 충전하고 그것을 저장하면Aspose.Imaging.DataStreamSupporter.Save(System.String) 방법, 출력 PNG 이미지 8 비트 / 픽셀이 생성됩니다.그것을 피하고 픽셀 당 1 비트로 PNG 이미지를 저장하려면이 방법을 사용하여 해당 저장 옵션을 얻고 통과하십시오.Aspose.Imaging.Image.Save(System.String,Aspose.Imaging.ImageOptionsBase) 방법은 두 번째 매개 변수입니다.

public override ImageOptionsBase GetOriginalOptions()

Returns

ImageOptionsBase

원본 파일 설정에 기초한 옵션.

Exceptions

TiffImageException

이미지에서 추출 할 수있는 원래 옵션이 없습니다.

Grayscale()

그림을 그레이스케일 표현으로 변환하여 그것을각 픽셀이 강도를 나타내는 단일 채널 이미지.이 방법을 통합분석을 단순화하고 개선하기 위해 이미지 처리 파이프라인에Grayscale 기반 알고리즘과 호환성, 다양한 컴퓨터를 촉진당신의 응용 프로그램 내에서 비전 및 이미지 분석 작업.

public override void Grayscale()

Examples

다음 예제는 색상화 된 TIFF 이미지를 그레이 스케일 표현으로 변환합니다. 그레이 스케일 이미지는 단순히 회색의 그림자로 구성되어 있으며 강도 정보 만 제공됩니다.

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

                                                                                                                                                                                                   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                                                   {
                                                                                                                                                                                                       Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                                                                                                                       tiffImage.Grayscale();
                                                                                                                                                                                                       tiffImage.Save(dir + "sample.Grayscale.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                                                   }

InsertFrame(인테리어, TiffFrame)

프레임 순서 내에서 지정된 인덱스에 새 프레임을 삽입하여프레임 조정에 대한 정확한 제어.이 방법을 사용하여 프레임을 관리합니다.효과적인 추적, 역동적 조작 및 이미지 조직을 촉진귀하의 응용 프로그램 내의 콘텐츠입니다.

public void InsertFrame(int index, TiffFrame frameToInsert)

Parameters

index int

프레임 목록에 새 프레임 인덱스

frameToInsert TiffFrame

삽입하기 위한 프레임.

NormalizeAngle(바울, 색상)

스캔 된 텍스트 문서를 위해 특별히 설계된 NormalizeAngle 방법을 사용하십시오.스케이트 스캔을 고치고 정확한 조화를 보장합니다.이 기능을 텍스트 처리 작업 흐름에 통합하여문서 읽기 및 품질, 텍스트 인식의 전체 효율성을 향상그리고 분석 작업.이 방법은 Aspose.Imaging.RasterImage.GetSkewAngle 및 Aspose.Imaging.FileFormats.Tiff.TiffImage.Rotate(System.Single,System.Boolean,Aspose.Imaging.Color) 방법을 사용합니다.

public override void NormalizeAngle(bool resizeProportionally, Color backgroundColor)

Parameters

resizeProportionally bool

‘진실’으로 설정하면 이미지 크기가 회전 된 직경 (구석 지점) 프로젝션에 따라 변경되며, 다른 경우에는 차원을 만지지 않고 내부 이미지 콘텐츠만 회전됩니다.

backgroundColor Color

배경의 색깔.

ReleaseManagedResources()

관리된 자원을 풀어주십시오. 관리되지 않은 자원이 여기에서 풀어주지 않도록하십시오.이 자원은 이미 풀어주었을 수도 있기 때문에.

protected override void ReleaseManagedResources()

RemoveFrame(이트)

그것의 인덱스에 의해 식별 된 프레임을 이미지 순서에서 쉽게 제거,당신의 응용 프로그램 내에서 프레임 관리를 단순화합니다.이를 통합프레임 조작의 효율성과 정확성을 향상시키는 기능,무조건 조직 및 이미지 콘텐츠의 프레젠테이션을 촉진합니다.

public TiffFrame RemoveFrame(int index)

Parameters

index int

프레임 인덱스를 제거해야 합니다.

Returns

TiffFrame

제거된 프레임

Examples

다음 예제는 각각의 래스터 이미지에서 TIFF 조립을 구성하는 방법을 보여줍니다.

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 &lt;= 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();
                                                                                                     }

Remarks

참고: 다른 TiffImage에 추가하지 않으면 프레임을 배치하는 것을 잊지 마십시오.

RemoveFrame(TiffFrame)

효율적으로 이미지 순서에서 지정된 프레임을 제거하여귀하의 응용 프로그램 내에서 프레임 관리의 단순화.이 기능을 통합프레임 조작의 정확성과 유연성을 향상시키고, 무선을 보장합니다.이미지 콘텐츠의 조직 및 프레젠테이션

public void RemoveFrame(TiffFrame frame)

Parameters

frame TiffFrame

제거하기 위한 프레임

Remarks

참고: 다른 TiffImage에 추가하지 않으면 프레임을 배치하는 것을 잊지 마십시오.

RemoveMetadata()

이 이미지 사례 메타 데이터를 제거하여 이 Aspose.Imaging.Xmp.IHasXMPData.xmpdata 및 VL16 .Exif.IhasExivDat.ExIFDate 값을 설정합니다. 0 0 0 0.

public override void RemoveMetadata()

ReplaceFrame(인테리어, TiffFrame)

지정된 위치에 있는 프레임을 다른 프레임으로 무조건 대체하십시오.이미지 순서 내에서 역동적 프레임 관리를 촉진합니다.프레임 조작에서 유연성과 정확성을 향상시키는 방법, 보장최적의 조직 및 응용 프로그램 내에서 이미지 콘텐츠의 프레젠테이션.

public TiffFrame ReplaceFrame(int index, TiffFrame frameToReplace)

Parameters

index int

제로 기반 프레임 위치

frameToReplace TiffFrame

교체할 수 있는 프레임

Returns

TiffFrame

제거된 프레임

Remarks

참고: 다른 TiffImage에 추가하지 않으면 프레임을 배치하는 것을 잊지 마십시오.

Resize(인트, 인트, ResizeType)

지정된 반복 유형에 따라 이미지를 재구성하여 유연성을 제공합니다.이미지 차원을 조정하면서 측면 비율을 유지하거나 특정 적용스케일링 알고리즘.이 방법을 이미지 처리 작업 흐름에 포함귀하의 응용 프로그램 내에서 재시작 작업에 대한 정확한 통제를 달성합니다.

public override void Resize(int newWidth, int newHeight, ResizeType resizeType)

Parameters

newWidth int

새로운 광도 입니다.

newHeight int

새로운 높이 입니다.

resizeType ResizeType

리세스 타입이죠.

Examples

이 예제는 TIFF 이미지를 업로드하고 다양한 재시지 방법을 사용하여 재시지합니다.

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

                                                                                         using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                         {
                                                                                             // Scale up by 2 times using Nearest Neighbour resampling.
                                                                                             image.Resize(image.Width* 2, image.Height* 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                             // Save to PNG with default options.
                                                                                             image.Save(dir + "upsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                         }

                                                                                         using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                         {
                                                                                             // Scale down by 2 times using Nearest Neighbour resampling.
                                                                                             image.Resize(image.Width / 2, image.Height / 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                             // Save to PNG with default options.
                                                                                             image.Save(dir + "downsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                         }

                                                                                         using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                         {
                                                                                             // Scale up by 2 times using Bilinear resampling.
                                                                                             image.Resize(image.Width* 2, image.Height* 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                             // Save to PNG with default options.
                                                                                             image.Save(dir + "upsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                         }

                                                                                         using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                         {
                                                                                             // Scale down by 2 times using Bilinear resampling.
                                                                                             image.Resize(image.Width / 2, image.Height / 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                             // Save to PNG with default options.
                                                                                             image.Save(dir + "downsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                         }

Resize(이트, 이트, ImageResizeSettings)

지정된 설정에 따라 이미지의 크기를 조정하여 정확성을 허용합니다.차원, 측면 비율 및 규모 행동을 통제합니다.이를 통합사용자 지정 재생을 달성하기 위해 이미지 처리 작업 흐름에 방법귀하의 신청서의 특정 요구 사항에 맞는 작업.

public override void Resize(int newWidth, int newHeight, ImageResizeSettings settings)

Parameters

newWidth int

새로운 광도 입니다.

newHeight int

새로운 높이 입니다.

settings ImageResizeSettings

재구성 설정에 대하여

Examples

이 예제는 TIFF 이미지를 업로드하고 다양한 재시지 설정을 사용하여 재시지합니다.

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

                                                                                          Aspose.Imaging.ImageResizeSettings resizeSettings = new Aspose.Imaging.ImageResizeSettings();

                                                                                          // The adaptive algorithm based on weighted and blended rational function and lanczos3 interpolation.
                                                                                          resizeSettings.Mode = Aspose.Imaging.ResizeType.AdaptiveResample;

                                                                                          // The small rectangular filter
                                                                                          resizeSettings.FilterType = Aspose.Imaging.ImageFilterType.SmallRectangular;

                                                                                          // The number of colors in the palette.
                                                                                          resizeSettings.EntriesCount = 256;

                                                                                          // The color quantization is not used
                                                                                          resizeSettings.ColorQuantizationMethod = ColorQuantizationMethod.None;

                                                                                          // The euclidian method
                                                                                          resizeSettings.ColorCompareMethod = ColorCompareMethod.Euclidian;

                                                                                          using (Aspose.Imaging.Image image = (Aspose.Imaging.Image)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                          {
                                                                                              Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                              // Scale down by 2 times using adaptive resampling.
                                                                                              tiffImage.Resize(image.Width / 2, image.Height / 2, resizeSettings);

                                                                                              // Save to PNG
                                                                                              tiffImage.Save(dir + "downsample.adaptive.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                          }

ResizeHeightProportionally(인트, ResizeType)

이미지의 높이에 대한 비례적인 조정을 수행하여 그 측면을 유지합니다.일관된 시각적 무결성에 대한 비율.이 방법을 사용하여 역동적으로 회복응용 프로그램 내의 이미지, 다양한 플랫폼에서 최적의 표시를 보장그리고 콘텐츠의 품질을 손상시키지 않고 장치.

public override void ResizeHeightProportionally(int newHeight, ResizeType resizeType)

Parameters

newHeight int

새로운 높이 입니다.

resizeType ResizeType

리시스의 종류입니다.

Examples

이 예제는 TIFF 이미지를 업로드하고 다양한 리시팅 방법을 사용하여 비례적으로 재시작합니다.만 높이가 지정되고 폭이 자동으로 계산됩니다.

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

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale up by 2 times using Nearest Neighbour resampling.
                                                                                                                                                                                 image.ResizeHeightProportionally(image.Height* 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "upsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale down by 2 times using Nearest Neighbour resampling.
                                                                                                                                                                                 image.ResizeHeightProportionally(image.Height / 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "downsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale up by 2 times using Bilinear resampling.
                                                                                                                                                                                 image.ResizeHeightProportionally(image.Height* 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "upsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale down by 2 times using Bilinear resampling.
                                                                                                                                                                                 image.ResizeHeightProportionally(image.Height / 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "downsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

ResizeProportional(인트, 인트, ResizeType)

이 방법을 사용하여 애플리케이션 내에서 이미지를 역동적으로 스케일하여 콘텐츠의 통일성에 대한 일관된 시각적 표현을 보장합니다.이 비율적인 리시지는 new의 비율에 따라 각 프레임을 리시합니다.

public void ResizeProportional(int newWidth, int newHeight, ResizeType resizeType)

Parameters

newWidth int

새로운 광도 입니다.

newHeight int

새로운 높이 입니다.

resizeType ResizeType

리세스 타입이죠.

ResizeWidthProportionally(인트, ResizeType)

이미지의 폭을 조정하면서 측면 비율을 유지하여최적의 시각적 프레젠테이션을 위해 적당한 반응.이 방법을 사용하여애플리케이션 내에서 역동적으로 스케일 이미지, 일관된 및다양한 디스플레이 컨텍스트를 통해 미학적으로 즐거운 렌더링.

public override void ResizeWidthProportionally(int newWidth, ResizeType resizeType)

Parameters

newWidth int

새로운 광도 입니다.

resizeType ResizeType

리시스의 종류입니다.

Examples

이 예제는 TIFF 이미지를 업로드하고 다양한 리시팅 방법을 사용하여 비례적으로 재시작합니다.

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

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale up by 2 times using Nearest Neighbour resampling.
                                                                                                                                                                                 image.ResizeWidthProportionally(image.Width* 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "upsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale down by 2 times using Nearest Neighbour resampling.
                                                                                                                                                                                 image.ResizeWidthProportionally(image.Width / 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "downsample.nearestneighbour.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale up by 2 times using Bilinear resampling.
                                                                                                                                                                                 image.ResizeWidthProportionally(image.Width* 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "upsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

                                                                                                                                                                             using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                                             {
                                                                                                                                                                                 // Scale down by 2 times using Bilinear resampling.
                                                                                                                                                                                 image.ResizeWidthProportionally(image.Width / 2, Aspose.Imaging.ResizeType.BilinearResample);

                                                                                                                                                                                 // Save to PNG with the default options.
                                                                                                                                                                                 image.Save(dir + "downsample.bilinear.png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                                             }

Rotate(플로트, 볼, 색상)

그림을 중앙 지점 주위에 지정된 각도로 회전하여 정확성을 제공합니다.방향 조정.이 기능을 이미지 처리에 포함파이프 라인은 정확한 변환을 촉진하고 최적의 조화를 보장하고귀하의 응용 프로그램 내에서 시각적 콘텐츠를 제공합니다.

public override void Rotate(float angle, bool resizeProportionally, Color backgroundColor)

Parameters

angle float

긍정적 값은 시계로 회전합니다.

resizeProportionally bool

‘진실’으로 설정하면 이미지 크기가 회전 된 직경 (구석 지점) 프로젝션에 따라 변경되며, 다른 경우에는 차원을 만지지 않고 내부 이미지 콘텐츠만 회전됩니다.

backgroundColor Color

배경의 색깔.

Examples

다음 예제는 TIFF 이미지를 45도 시계로 중심 주위를 회전하는 방법을 보여줍니다.

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 + "rotated.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 the linear gradient brush.
                                                                                                                Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(tiffImage);
                                                                                                                gr.FillRectangle(brush, tiffImage.Bounds);

                                                                                                                // Rotate the image around the center by 45 degrees clockwise. 
                                                                                                                // The image size changed according to rotated rectangle (corner points).
                                                                                                                tiffImage.Rotate(45f, true, Aspose.Imaging.Color.Black);
                                                                                                                tiffImage.Save();

                                                                                                                // Rotate the image around the center by 45 degrees clockwise.
                                                                                                                // Leave the image dimensions untouched and only the internal image content are rotated.
                                                                                                                tiffImage.Rotate(45f, false, Aspose.Imaging.Color.Gray);
                                                                                                                tiffImage.Save(dir + "rotated.preservesize.tif");
                                                                                                            }

RotateFlip(RotateFlipType)

회전, 플리핑 또는 두 작업의 조합을 수행하십시오.이 방법은 개별 프레임 내의 정확한 조작을 허용합니다.이미지 순서, 이미지 편집 및 구성 내에서 유연성을 향상시키는당신의 신청

public override void RotateFlip(RotateFlipType rotateFlipType)

Parameters

rotateFlipType RotateFlipType

로테이트 플립 유형

Examples

이 예제는 TIFF 이미지를 충전하고, 90도 시계로 회전하고, 선택적으로 이미지를 수평 및/또는 수직으로 니다.

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

                                                                                                                                              Aspose.Imaging.RotateFlipType[] rotateFlipTypes = new Aspose.Imaging.RotateFlipType[]
                                                                                                                                              {
                                                                                                                                                  Aspose.Imaging.RotateFlipType.Rotate90FlipNone,
                                                                                                                                                  Aspose.Imaging.RotateFlipType.Rotate90FlipX,
                                                                                                                                                  Aspose.Imaging.RotateFlipType.Rotate90FlipXY,
                                                                                                                                                  Aspose.Imaging.RotateFlipType.Rotate90FlipY,
                                                                                                                                              };

                                                                                                                                              foreach (Aspose.Imaging.RotateFlipType rotateFlipType in rotateFlipTypes)
                                                                                                                                              {
                                                                                                                                                  // Rotate, flip and save to the output file.
                                                                                                                                                  using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                                                                  {
                                                                                                                                                      image.RotateFlip(rotateFlipType);
                                                                                                                                                      image.Save(dir + "sample." + rotateFlipType + ".png", new Aspose.Imaging.ImageOptions.PngOptions());
                                                                                                                                                  }
                                                                                                                                              }

SaveData(Stream)

개체의 데이터를 지정된 흐름으로 저장합니다.

protected override void SaveData(Stream stream)

Parameters

stream Stream

흐름은 객체의 데이터를 저장합니다.

SetResolution(더블, 더블)

지정된 Aspose.Imaging.RasterImage에 대한 해상도를 설정하여이미지 렌더링 및 표시 속성에 대한 정확한 제어.이를 통합기능은 시각적 출력을 최적화하고 다양한 기능과 호환성을 보장합니다.출력 장치 및 플랫폼, 전체 사용자 경험을 향상시킵니다.

public override void SetResolution(double dpiX, double dpiY)

Parameters

dpiX double

Aspose.Imaging.RasterImage의 수평 해상도, 인치 당 포인트.

dpiY double

Aspose.Imaging.RasterImage의 수직 해상도, 인치 당 포인트.

Examples

다음 예제는 TIFF 이미지의 수평/수직 해상도를 설정하는 방법을 보여줍니다.

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

                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.tif"))
                                                                                                 {
                                                                                                     Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)image;

                                                                                                     // Get horizontal and vertical resolution of the TiffImage.
                                                                                                     double horizontalResolution = tiffImage.HorizontalResolution;
                                                                                                     double verticalResolution = tiffImage.VerticalResolution;
                                                                                                     System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", horizontalResolution);
                                                                                                     System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", verticalResolution);

                                                                                                     if (horizontalResolution != 96.0 || verticalResolution != 96.0)
                                                                                                     {
                                                                                                         // Use the SetResolution method for updating both resolution values in a single call.
                                                                                                         System.Console.WriteLine("Set resolution values to 96 dpi");
                                                                                                         tiffImage.SetResolution(96.0, 96.0);

                                                                                                         System.Console.WriteLine("The horizontal resolution, in pixels per inch: {0}", tiffImage.HorizontalResolution);
                                                                                                         System.Console.WriteLine("The vertical resolution, in pixels per inch: {0}", tiffImage.VerticalResolution);
                                                                                                     }
                                                                                                 }

UpdateDimensions(이트, 이트)

이미지 차원을 업데이트합니다.

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

새로운 이미지 폭.

newHeight int

새로운 이미지 높이.

Exceptions

NotImplementedException

 한국어