Class RasterCachedMultipageImage

Class RasterCachedMultipageImage

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

拉斯特多页图像

public abstract class RasterCachedMultipageImage : RasterCachedImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasMetadata, IMultipageImage

Inheritance

object DisposableObject DataStreamSupporter Image RasterImage RasterCachedImage RasterCachedMultipageImage

Derived

ApngImage , DicomImage , DjvuImage , GifImage , IcoImage , TiffImage , WebPImage

Implements

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

继承人

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()

Constructors

RasterCachedMultipageImage(色彩色彩)

启动了 Aspose.Imaging.RasterCachedMultipageImage 类的新例子。

protected RasterCachedMultipageImage(IColorPalette colorPalette)

Parameters

colorPalette IColorPalette

颜色板。

RasterCachedMultipageImage()

启动了 Aspose.Imaging.RasterCachedMultipageImage 类的新例子。

protected RasterCachedMultipageImage()

Properties

BackgroundColor

收到或设置背景颜色的值。

public override Color BackgroundColor { get; set; }

财产价值

Color

BitsPerPixel

接收图像比特每像素计算。

public override int BitsPerPixel { get; }

财产价值

int

HasAlpha

得到一个值,表明这个例子是否有阿尔法。

public override bool HasAlpha { get; }

财产价值

bool

HasTransparentColor

收到一个值,表明图像是否有透明的颜色。

public override bool HasTransparentColor { get; }

财产价值

bool

Height

得到图像高度。

public override int Height { get; }

财产价值

int

ImageOpacity

这个图像是不可思议的。

public override float ImageOpacity { get; }

财产价值

float

IsCached

收到一个值,表明图像数据是否目前被隐藏。

public override bool IsCached { get; }

财产价值

bool

PageCount

接到页数。

public abstract int PageCount { get; }

财产价值

int

PageExportingAction

接收或设置页面出口行动。请注意,设置此方法将自动发布页面资源后执行。它将在每个页面保存之前执行。

public virtual PageExportingAction PageExportingAction { get; set; }

财产价值

PageExportingAction

Examples

下面的例子显示在保存(出口) Tiff 图像之前的包转换。

string fileName = "10MB_Tif.tif";
                                                                                                  string inputFileName = fileName;

                                                                                                  string outputFileNameTif = "output.tif";

                                                                                                  //The possibility of batch conversion before saving (exporting) Tiff images is implemented.

                                                                                                  using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(inputFileName))
                                                                                                  {
                                                                                                      // Set batch operation for pages
                                                                                                      tiffImage.PageExportingAction = delegate(int index, Image page)
                                                                                                      {
                                                                                                          // Fires garbage collection to avoid unnecessary garbage storage from previous pages
                                                                                                          GC.Collect();

                                                                                                          ((Aspose.Imaging.RasterImage)page).Rotate(90);
                                                                                                      };

                                                                                                      tiffImage.Save(outputFileNameTif);

                                                                                                      /* Attention! In batch mode all pages will be released in this line!
                                                                                                       If you want to further perform operations on the original image, you should reload it from the source to another instance. */
                                                                                                  }

Pages

拿到页面。

public abstract Image[] Pages { get; }

财产价值

Image ( )

Width

得到图像的宽度。

public override int Width { get; }

财产价值

int

XmpData

从框中获取或设置XMP数据。

public override XmpPacketWrapper XmpData { get; set; }

财产价值

XmpPacketWrapper

Methods

AdjustBrightness(因特)

调整图像的 brightness。

public override void AdjustBrightness(int brightness)

Parameters

brightness int

光的价值。

AdjustContrast(航海)

Aspose.Imaging.Image 相反

public override void AdjustContrast(float contrast)

Parameters

contrast float

对比值(在范围内(100;100)

AdjustGamma(航海、航海、航海)

图像的Gamma修复。

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

Parameters

gammaRed float

红频率的Gamma

gammaGreen float

绿色频道的Gamma

gammaBlue float

蓝色频道的Gamma

AdjustGamma(航海)

图像的Gamma修复。

public override void AdjustGamma(float gamma)

Parameters

gamma float

红色、绿色和蓝色频道的Gamma

BinarizeBradley(双重, int)

使用布拉德利的适应边界算法进行图像二元化,使用整体图像边界

public override void BinarizeBradley(double brightnessDifference, int windowSize)

Parameters

brightnessDifference double

像素之间的亮度差异和像素的平均窗口 s x s 的差异聚集在这个像素周围。

windowSize int

这个像素周围集中的像素的 x s 窗口的尺寸

BinarizeBradley(双重)

使用布拉德利的适应边界算法进行图像二元化,使用整体图像边界

public override void BinarizeBradley(double brightnessDifference)

Parameters

brightnessDifference double

像素之间的亮度差异和像素的平均窗口 s x s 的差异聚集在这个像素周围。

BinarizeFixed(比特)

图像的二元化与预先定义边界

public override void BinarizeFixed(byte threshold)

Parameters

threshold byte

如果一个像素的相应灰色值超过边界值,则255 将被分配给它, 0 否则。

BinarizeOtsu()

图像的二元化与 Otsu 边界

public override void BinarizeOtsu()

Blend(点, RasterImage, Rectangle, byte)

将此图像示例与 overlay’ 图像混合。

public override void Blend(Point origin, RasterImage overlay, Rectangle overlayArea, byte overlayAlpha = 255)

Parameters

origin Point

背景图像混合起源。

overlay RasterImage

超越的形象。

overlayArea Rectangle

超级区域。

overlayAlpha byte

超级阿尔法。

Exceptions

ImageException

图像例外

CacheData()

隐藏个人数据。

public override void CacheData()

CanDoAdjustments()

以此为主,以此为主,以此为主。

protected virtual bool CanDoAdjustments()

Returns

bool

假如是真理,否则是虚假的。

Crop(Rectangle)

打破图像。

public override void Crop(Rectangle rectangle)

Parameters

rectangle Rectangle

直角。

Crop(int , int , int , int , int)

种植图像与转换。

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

Parameters

leftShift int

左转。

rightShift int

正确的转换。

topShift int

顶级转换。

bottomShift int

底部交换。

Exceptions

ArgumentException

直角不正确 - 直角或直角必须包含在图像界限中。

ImageException

不能种植图像. 框架指数:“+框架指数或不能种植图像。

CropMain(int , int , int , int , int)

打破主要。

protected virtual void CropMain(int leftShift, int rightShift, int topShift, int bottomShift)

Parameters

leftShift int

左转。

rightShift int

正确的转换。

topShift int

顶级转换。

bottomShift int

底部交换。

Dither(DitheringMethod, int,IColorPalette)

表现在当前图像上旋转。

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

Parameters

ditheringMethod DitheringMethod

定位方法。

bitsCount int

最后的比特数为Ditering。

customPalette IColorPalette

可用于Ditering的配件。

Filter(Rectangle, FilterOptions 基于)

过滤指定的直角。

public override void Filter(Rectangle rectangle, FilterOptionsBase options)

Parameters

rectangle Rectangle

直角。

options FilterOptionsBase

选项的。

GetPagesAsEnumerable()

将页面列为可列。

protected virtual IEnumerable<image/> GetPagesAsEnumerable()

Returns

IEnumerable < Image >

自己的页面如可列数。

GetSerializedStream(ImageOptionsBase, 直角, out int)

转换为APS。

public override Stream GetSerializedStream(ImageOptionsBase imageOptions, Rectangle clippingRectangle, out int pageNumber)

Parameters

imageOptions ImageOptionsBase

图像选项。

clippingRectangle Rectangle

直角的直角。

pageNumber int

页面号码。

Returns

Stream

序列流

Grayscale()

将图像转化为其灰色代表性

public override void Grayscale()

NormalizeAngle(白色,颜色)

正常化角度。这种方法适用于扫描文档,以摆脱扫描的扫描。此方法使用 Aspose.Imaging.RasterImage.GetSkewAngle 和 Aspose.Imaging.RasterCachedMultipageImage.Rotate(System.Single,System.Boolean,Aspose.Imaging.Color) 方法。

public override void NormalizeAngle(bool resizeProportionally, Color backgroundColor)

Parameters

resizeProportionally bool

如果设置为“真实”,您的图像大小将根据旋转直角(角点)的投影而改变,否则它会使尺寸不受触摸,只有内部图像内容被旋转。

backgroundColor Color

背景的颜色。

NormalizeHistogram()

正常化图像 histogram - 调整像素值使用所有可用的范围。

public override void NormalizeHistogram()

ReleaseManagedResources()

释放管理的资源. 确保没有未管理的资源在这里释放,因为它们可能已经已经释放了

protected override void ReleaseManagedResources()

ReplaceColor(int , byte , int)

它用允许的差异替换一个颜色,并保留原始的阿尔法值,以节省顺利的边缘。

public override void ReplaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)

Parameters

oldColorArgb int

旧颜色 ARGB 值将被取代。

oldColorDiff byte

允许旧颜色的差异,以便能够扩展取代的颜色色调。

newColorArgb int

新颜色 ARGB 值取代旧颜色。

ReplaceNonTransparentColors(因特)

它将所有不透明的颜色替换为新的颜色,并保留原始的阿尔法值,以节省顺利的边缘。注意:如果您在没有透明度的图像上使用它,则所有颜色都会被单一的颜色取代。

public override void ReplaceNonTransparentColors(int newColorArgb)

Parameters

newColorArgb int

新颜色ARGB值取代不透明的颜色。

Resize(int , int , resizeType)

恢复图像。

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

Parameters

newWidth int

新的宽度。

newHeight int

新高度。

resizeType ResizeType

回归类型。

Resize(int , int , ImageResizeSettings)

恢复图像。

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

Parameters

newWidth int

新的宽度。

newHeight int

新高度。

settings ImageResizeSettings

重新设置。

ResizeHeightProportionally(重定向,重定向)

将宽度均衡。

public override void ResizeHeightProportionally(int newHeight, ResizeType resizeType)

Parameters

newHeight int

新高度。

resizeType ResizeType

回归的类型。

ResizeMain(int , int , resizeType)

只保留图像重振。

protected virtual void ResizeMain(int newWidth, int newHeight, ResizeType resizeType)

Parameters

newWidth int

新的宽度。

newHeight int

新高度。

resizeType ResizeType

回归的类型。

ResizeWidthProportionally(重定向,重定向)

将宽度均衡。

public override void ResizeWidthProportionally(int newWidth, ResizeType resizeType)

Parameters

newWidth int

新的宽度。

resizeType ResizeType

回归的类型。

Rotate(彩色 , 彩色 , 彩色)

Aspose.Imaging.RasterCachedMultipageImage.Rotate(System.Single,System.Boolean,Aspose.Imaging.Color)图像周围的中心。

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

Parameters

angle float

旋转的角度在度,积极的值会旋转时钟。

resizeProportionally bool

如果设置为“真实”,您的图像大小将根据旋转直角(角点)的图像在其他情况下,留下尺寸无触摸,只有内部图像内容被旋转。

backgroundColor Color

背景的颜色。

RotateFlip(RotateFlipType)

旋转、旋转、旋转和旋转所有页面。

public override void RotateFlip(RotateFlipType rotateFlipType)

Parameters

rotateFlipType RotateFlipType

旋转的Flip类型。

RotateFlipAll(RotateFlipType)

旋转了所有的Flip。

[Obsolete("Please use RotateFlip instead of this method.")]
public virtual void RotateFlipAll(RotateFlipType rotateFlip)

Parameters

rotateFlip RotateFlipType

旋转的Flip。

RotateFlipMain(RotateFlipType)

旋转主要的Flip。

protected virtual void RotateFlipMain(RotateFlipType rotateFlipType)

Parameters

rotateFlipType RotateFlipType

旋转式Flip的类型。

SavePixelsInternalMain(直角, int[])

存储内部主要的像素。

protected virtual void SavePixelsInternalMain(Rectangle rectangle, int[] pixels)

Parameters

rectangle Rectangle

直角。

pixels int ( )

像素。

 中文