Class WebPFrameBlock

Class WebPFrameBlock

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

웹 블록을 나타내는 레지스트리 개방자.

[JsonObject(MemberSerialization.OptIn)]
public class WebPFrameBlock : RasterCachedImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasMetadata, IFrame, IAnimationFrame

Inheritance

object DisposableObject DataStreamSupporter Image RasterImage RasterCachedImage WebPFrameBlock

Implements

IDisposable , IObjectWithBounds , IRasterImageArgb32PixelLoader , IRasterImageRawDataLoader , IHasXmpData , IHasMetadata , IFrame , IAnimationFrame

상속 회원들

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

웹프라임블록(RasterImage)

Aspose.Imaging.FileFormats.Webp.webPFrameBlock의 새로운 사례를 시작합니다.

클래스 입니다

public WebPFrameBlock(RasterImage rasterImage)

Parameters

rasterImage RasterImage

라스터 이미지 입니다.

웹프라임블록(이트, 이트)

Aspose.Imaging.FileFormats.Webp.WebPFrameBlock 클래스의 새로운 예를 시작합니다.

public WebPFrameBlock(int width, int height)

Parameters

width int

넓은 넓은

height int

높이에 대하여

Examples

이 예제는 지정된 옵션으로 멀티 프레임 애니메이션 WebP 이미지를 만드는 방법을 보여줍니다.

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

                                                                                                         Aspose.Imaging.ImageOptions.WebPOptions createOptions = new Aspose.Imaging.ImageOptions.WebPOptions();
                                                                                                         createOptions.Lossless = true;
                                                                                                         createOptions.Quality = 100f;
                                                                                                         createOptions.AnimBackgroundColor = (uint)Aspose.Imaging.Color.Gray.ToArgb();

                                                                                                         // The default frame plus 36 + 36 additional frames.
                                                                                                         createOptions.AnimLoopCount = 36 + 36 + 1;

                                                                                                         // Create a WebP image of 100x100 px.
                                                                                                         using (Aspose.Imaging.FileFormats.Webp.WebPImage webPImage = new Aspose.Imaging.FileFormats.Webp.WebPImage(100, 100, createOptions))
                                                                                                         {
                                                                                                             // The first circle is red
                                                                                                             Aspose.Imaging.Brushes.SolidBrush brush1 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);

                                                                                                             // The second circle is black
                                                                                                             Aspose.Imaging.Brushes.SolidBrush brush2 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Black);

                                                                                                             // Gradually inscrease the angle of the red arc shape.
                                                                                                             for (int angle = 10; angle <= 360; angle += 10)
                                                                                                             {
                                                                                                                 Aspose.Imaging.FileFormats.Webp.WebPFrameBlock block = new Aspose.Imaging.FileFormats.Webp.WebPFrameBlock(100, 100);
                                                                                                                 Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(block);
                                                                                                                 graphics.FillPie(brush1, block.Bounds, 0, angle);

                                                                                                                 webPImage.AddBlock(block);
                                                                                                             }

                                                                                                             // Gradually inscrease the angle of the black arc and wipe out the red arc.
                                                                                                             for (int angle = 10; angle <= 360; angle += 10)
                                                                                                             {
                                                                                                                 Aspose.Imaging.FileFormats.Webp.WebPFrameBlock block = new Aspose.Imaging.FileFormats.Webp.WebPFrameBlock(100, 100);

                                                                                                                 Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(block);
                                                                                                                 graphics.FillPie(brush2, block.Bounds, 0, angle);
                                                                                                                 graphics.FillPie(brush1, block.Bounds, angle, 360 - angle);

                                                                                                                 webPImage.AddBlock(block);
                                                                                                             }

                                                                                                             // Save to a WebP file
                                                                                                             webPImage.Save(dir + "output.webp");
                                                                                                         }

Properties

BitsPerPixel

픽셀 계산에 따라 이미지 비트를 얻습니다.

public override int BitsPerPixel { get; }

부동산 가치

int

DisposalMethod

배제 방법을 얻거나 설정합니다.

public AnimationDisposalMethods DisposalMethod { get; set; }

부동산 가치

AnimationDisposalMethods

Duration

수신 또는 프레임 기간을 설정합니다.

public short Duration { get; set; }

부동산 가치

short

FrameLeft

왼쪽 프레임을 보상합니다.

public int FrameLeft { get; }

부동산 가치

int

FrameTime

프레임 기간을 얻습니다.

public int FrameTime { get; }

부동산 가치

int

FrameTop

프레임 꼭대기 혜택을 받으세요.

public int FrameTop { get; }

부동산 가치

int

HasAlpha

이 경우 알파가 있는지 여부를 나타내는 값을 얻습니다.

public override bool HasAlpha { get; }

부동산 가치

bool

Examples

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

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

                                                                                                                   string fileName = dir + "sample.webp";
                                                                                                                   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(fileName))
                                                                                                                   {
                                                                                                                       Aspose.Imaging.FileFormats.Webp.WebPImage webpImage = (Aspose.Imaging.FileFormats.Webp.WebPImage)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, webpImage.RawDataFormat, webpImage.HasAlpha);

                                                                                                                       int i = 0;
                                                                                                                       foreach (Aspose.Imaging.FileFormats.Webp.IFrame frame in webpImage.Blocks)
                                                                                                                       {
                                                                                                                           Aspose.Imaging.FileFormats.Webp.WebPFrameBlock frameBlock = frame as Aspose.Imaging.FileFormats.Webp.WebPFrameBlock;
                                                                                                                           if (frameBlock != null)
                                                                                                                           {
                                                                                                                               System.Console.WriteLine("Frame={0}, FileFormat={1}, HasAlpha={2}", i++, frameBlock.RawDataFormat, frameBlock.HasAlpha);
                                                                                                                           }
                                                                                                                       }
                                                                                                                   }

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

Height

그림의 높이를 얻습니다.

public override int Height { get; }

부동산 가치

int

Left

왼쪽의 프레임 위치를 얻거나 설정합니다.

public short Left { get; set; }

부동산 가치

short

Top

그것을 얻거나 프레임 위치를 상단으로 설정합니다.

public short Top { get; set; }

부동산 가치

short

UseAlphaBlending

현재 프레임이 이전 프레임 알파 값과 혼합되는지 여부를 나타내는 값을 얻거나 설정합니다.

public bool UseAlphaBlending { get; set; }

부동산 가치

bool

Width

이미지를 광범위하게 만듭니다.

public override int Width { get; }

부동산 가치

int

Methods

GetFullFrame()

완전한 프레임을 얻습니다.

public RasterImage GetFullFrame()

Returns

RasterImage

전체 프레임 이미지

SaveData(Stream)

데이터를 저장합니다.

protected override void SaveData(Stream stream)

Parameters

stream Stream

데이터를 저장하기위한 스트림.

Exceptions

NotImplementedException

UpdateDimensions(이트, 이트)

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

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

새로운 이미지 폭.

newHeight int

새로운 이미지 높이.

 한국어