Class GifFrameBlock

Class GifFrameBlock

Pôvodný názov: Aspose.Imaging.FileFormats.Gif.Blocks Zhromaždenie: Aspose.Imaging.dll (25.4.0)

GIF rámová trieda.

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

Inheritance

object DisposableObject DataStreamSupporter Image RasterImage RasterCachedImage GifFrameBlock

Implements

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

Z dedičných členov

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.IsCached , 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.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 , 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.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.CacheData() , DataStreamSupporter.Save() , DataStreamSupporter.Save(Stream) , DataStreamSupporter.Save(string) , DataStreamSupporter.Save(string, bool) , DataStreamSupporter.DataStreamContainer , DataStreamSupporter.IsCached , DisposableObject.Dispose() , DisposableObject.Disposed , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

GifFrameBlock(Ťažko, Ťažko)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(ushort width, ushort height)

Parameters

width ushort

Rozsah obrazu je široký.

height ushort

Výška obrazu.

Examples

Tento príklad ukazuje, ako vytvoriť GIF obrázok a uložiť ho do súboru.

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

                                                                              // Create a GIF Frame block of 100x100 px.
                                                                              using (Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock firstBlock = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100))
                                                                              {
                                                                                  // Fill the entire block in red.
                                                                                  Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(firstBlock);
                                                                                  Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                  gr.FillRectangle(brush, firstBlock.Bounds);

                                                                                  using (Aspose.Imaging.FileFormats.Gif.GifImage gifImage = new Aspose.Imaging.FileFormats.Gif.GifImage(firstBlock))
                                                                                  {
                                                                                      gifImage.Save(dir + "output.gif");
                                                                                  }
                                                                              }

Tento príklad ukazuje, ako vytvoriť GIF obrázok s vlastnou paletou a uložiť ho do súboru.

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

                                                                                                    // Create a GIF Frame block of 100x100 px.
                                                                                                    using (Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock firstBlock = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100))
                                                                                                    {
                                                                                                        // Fill the entire block in red.
                                                                                                        Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(firstBlock);
                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                                        gr.FillRectangle(brush, firstBlock.Bounds);

                                                                                                        // Use 4-bit palette to reduce the image size. The quality can get worse.
                                                                                                        Aspose.Imaging.IColorPalette palette = Aspose.Imaging.ColorPaletteHelper.Create4Bit();

                                                                                                        using (Aspose.Imaging.FileFormats.Gif.GifImage gifImage = new Aspose.Imaging.FileFormats.Gif.GifImage(firstBlock, palette))
                                                                                                        {
                                                                                                            gifImage.Save(dir + "output.gif");
                                                                                                        }
                                                                                                    }

Nasledujúci príklad ukazuje, ako skombinovať animovaný GIF obrázok z jednotlivých gIF blokov.

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

                                                                                                       // Create a GIF image 100 x 100 px.
                                                                                                       // The first block is fully black by default.
                                                                                                       using (Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock firstBlock = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100))
                                                                                                       using (Aspose.Imaging.FileFormats.Gif.GifImage gifImage = new Aspose.Imaging.FileFormats.Gif.GifImage(firstBlock))
                                                                                                       {
                                                                                                           // 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.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);

                                                                                                               Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(block);
                                                                                                               gr.FillPie(brush1, block.Bounds, 0, angle);

                                                                                                               gifImage.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.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);

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

                                                                                                               gifImage.AddBlock(block);
                                                                                                           }

                                                                                                           gifImage.Save(dir + "animated_radar.gif");
                                                                                                       }

GifFrameBlock(Ťažkosti, Šťastné, Štýlové)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(ushort left, ushort top, ushort width, ushort height)

Parameters

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

width ushort

Rozsah obrazu je široký.

height ushort

Výška obrazu.

GifFrameBlock(Ushort, ushort , ushorta , IkolorPalette , Bool , bool, byte)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(ushort left, ushort top, ushort width, ushort height, IColorPalette colorPalette, bool isPaletteSorted, bool isGifFrameInterlaced, byte bitsPerPixel)

Parameters

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

width ushort

Obrázok je široký.

height ushort

Obrázok na výšku.

colorPalette IColorPalette

Farebná paleta .

isPaletteSorted bool

Ak je nastavený na “skutočný”, farebná paleta je usporiadaná.

isGifFrameInterlaced bool

Ak je nastavený na “skutočný”, GIF rám je prepojený.

bitsPerPixel byte

Bity na pixel.

GifFrameBlock(RasterImage)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(RasterImage image)

Parameters

image RasterImage

Obrázok na inicializáciu pixelov rámu a dátové palety s.

GifFrameBlock(Rozprávka, Ushort, ushort)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(RasterImage image, ushort left, ushort top)

Parameters

image RasterImage

Obrázok na inicializáciu pixelov rámu a dátové palety s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

GifFrameBlock(RasterImage, Ushort, ushort a bool, byte)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(RasterImage image, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)

Parameters

image RasterImage

Obrázok na inicializáciu pixelov rámu a dátové palety s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

isPaletteSorted bool

Ak je nastavený na “skutočný”, farebná paleta je usporiadaná.

isGifFrameInterlaced bool

Ak je nastavený na “skutočný”, GIF rám je prepojený.

lzwCodeSize byte

Bity na pixel.

GifFrameBlock(Stream)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(Stream stream)

Parameters

stream Stream

Stream nahrať obrázok z a inicializovať rám pixelov a paletových údajov s.

GifFrameBlock(Stream, Ushort, ushort)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(Stream stream, ushort left, ushort top)

Parameters

stream Stream

Stream nahrať obrázok z a inicializovať rám pixelov a paletových údajov s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

GifFrameBlock(Stream, Ushort, ushort a bool, byte)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(Stream stream, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)

Parameters

stream Stream

Stream nahrať obrázok z a inicializovať rám pixelov a paletových údajov s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

isPaletteSorted bool

Ak je nastavený na “skutočný”, farebná paleta je usporiadaná.

isGifFrameInterlaced bool

Ak je nastavený na “skutočný”, GIF rám je prepojený.

lzwCodeSize byte

Bity na pixel.

GifFrameBlock(Stretnutie)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(string path)

Parameters

path string

Cesta na načítanie obrazu z a inicializovať rám pixelov a dátové palety s.

GifFrameBlock(Stretnutie, ushort, Ushort)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(string path, ushort left, ushort top)

Parameters

path string

Cesta na načítanie obrazu z a inicializovať rám pixelov a dátové palety s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

GifFrameBlock(String, Ushort, ushort a bool, byte)

Initalizuje novú inštanciu triedy Aspose.Imaging.FileFormats.Gif.Blocks.

public GifFrameBlock(string path, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)

Parameters

path string

Cesta na načítanie obrazu z a inicializovať rám pixelov a dátové palety s.

left ushort

Pozícia ľavého obrazu.

top ushort

Najvyššia pozícia obrazu.

isPaletteSorted bool

Ak je nastavený na “skutočný”, farebná paleta je usporiadaná.

isGifFrameInterlaced bool

Ak je nastavený na “skutočný”, GIF rám je prepojený.

lzwCodeSize byte

Bity na pixel.

Fields

ExtensionLabel

Blokové rozšírenie značky.

public const int ExtensionLabel = 44

Fieldová hodnota

int

ImageDescriptorSize

Veľkosť obrázkového popisníka.

public const int ImageDescriptorSize = 10

Fieldová hodnota

int

Properties

BackgroundColor

Získa alebo nastaví hodnotu pre farbu pozadia.

public override Color BackgroundColor { get; set; }

Hodnota nehnuteľnosti

Color

BitsPerPixel

Získava obrázok bitov na pixel počítanie.

public override int BitsPerPixel { get; }

Hodnota nehnuteľnosti

int

ControlBlock

Získajte grafický ovládací blok spojený s týmto blokom.

public GifGraphicsControlBlock ControlBlock { get; }

Hodnota nehnuteľnosti

GifGraphicsControlBlock

DisposalMethod

Získajte metódu odstraňovania.

public AnimationDisposalMethods DisposalMethod { get; }

Hodnota nehnuteľnosti

AnimationDisposalMethods

FileFormat

Získava hodnotu formátu súborov

public override FileFormat FileFormat { get; }

Hodnota nehnuteľnosti

FileFormat

Flags

Vezmite alebo položte vlajky.

public byte Flags { get; set; }

Hodnota nehnuteľnosti

byte

FrameLeft

Dostaneš ľavú stranu.

public int FrameLeft { get; }

Hodnota nehnuteľnosti

int

FrameTime

Získajte alebo nastavíte trvanie.

public int FrameTime { get; set; }

Hodnota nehnuteľnosti

int

FrameTop

Konvertovať na p.

public int FrameTop { get; }

Hodnota nehnuteľnosti

int

GifFrameBitsPerPixel

Získať alebo nastaviť GIF rám bitov na pixel.

public byte GifFrameBitsPerPixel { get; set; }

Hodnota nehnuteľnosti

byte

HasTransparentColor

Získava hodnotu, ktorá ukazuje, či má rámový blok transparentnú farbu.

public override bool HasTransparentColor { get; set; }

Hodnota nehnuteľnosti

bool

Height

Získava výšku obrazu.

public override int Height { get; }

Hodnota nehnuteľnosti

int

Interlaced

Získava alebo nastaví hodnotu, ktorá naznačuje, či je tento Aspose.Imaging.FileFormats.Gif.Blocks. GifFrameBlock prepojený.

public bool Interlaced { get; set; }

Hodnota nehnuteľnosti

bool

IsInterlaced

Získava hodnotu, ktorá naznačuje, či je tento obrazový príklad prepojený.

public bool IsInterlaced { get; }

Hodnota nehnuteľnosti

bool

IsPaletteSorted

Získa alebo nastaví hodnotu, ktorá naznačuje, či je farebná paleta usporiadaná.

public bool IsPaletteSorted { get; set; }

Hodnota nehnuteľnosti

bool

Left

Získajte alebo nastavíte umiestnenie ľavého obrazu.

[JsonProperty]
public ushort Left { get; set; }

Hodnota nehnuteľnosti

ushort

Top

Získať alebo nastaviť najvyššie umiestnenie obrazu.

[JsonProperty]
public ushort Top { get; set; }

Hodnota nehnuteľnosti

ushort

TransparentColor

Získa transparentnú farbu rámového bloku.

public override Color TransparentColor { get; set; }

Hodnota nehnuteľnosti

Color

UseAlphaBlending

Získava hodnotu, ktorá ukazuje, či [užívať alfa miešanie].

public bool UseAlphaBlending { get; }

Hodnota nehnuteľnosti

bool

Width

Získajte šírku obrazu.

public override int Width { get; }

Hodnota nehnuteľnosti

int

Methods

AdjustBrightness(int)

Nastavenie jasu pre obrázok.

public override void AdjustBrightness(int brightness)

Parameters

brightness int

Hodnoty jasnosti .

CreateFlags(IkolorPalette, Bool, bool)

Vytvárajú sa vlajky.

public static byte CreateFlags(IColorPalette colorPalette, bool isPaletteSorted, bool isGifFrameInterlaced)

Parameters

colorPalette IColorPalette

Farebná paleta .

isPaletteSorted bool

Ak je nastavený na “skutočný”, farby v farebnej palete sú zoskupené.

isGifFrameInterlaced bool

ak je nastavený na “skutočný” obraz rámu GIF je prepojený.

Returns

byte

Vytvorené vlajky

GetColorPalette(Spoločnosť IColorPalette)

Získava spojenú farebnú paletu.

public static IColorPalette GetColorPalette(IColorPalette framePalette, IColorPalette containerPalette)

Parameters

framePalette IColorPalette

Na palete rámu.

containerPalette IColorPalette

Kontajnerová paleta .

Returns

IColorPalette

Farebná paleta .

GetFullFrame()

Dostane celý rám.

public RasterImage GetFullFrame()

Returns

RasterImage

Rastliny s plným rámom

Exceptions

NotImplementedException

GetOriginalOptions()

Získajte možnosti založené na pôvodných nastaveniach súboru.To môže byť užitočné udržať bitovú hĺbku a ďalšie parametre pôvodného obrazu nezmenené.Napríklad, ak nahrávame čiernobiely PNG obrázok s 1 bitom na pixel a potom ho uložíme pomocouAspose.Imaging.DataStreamSupporter.Save(System.String) metóda, bude produkovaný výstupný PNG obrázok s 8-bitom na pixel.Aby ste sa tomu vyhli a ušetrili PNG obrázok s 1 bitom na pixel, použite túto metódu, aby ste získali príslušné možnosti ušetrenia a prešli ichna metódu Aspose.Imaging.Image.Save(System.String,_Wl17.ImageOptionsBase) ako druhý parameter.

public override ImageOptionsBase GetOriginalOptions()

Returns

ImageOptionsBase

Možnosti založené na pôvodných nastaveniach súboru.

OnPaletteChanged(Spoločnosť IColorPalette)

Volá sa, keď sa paleta mení.

protected override void OnPaletteChanged(IColorPalette oldPalette, IColorPalette newPalette)

Parameters

oldPalette IColorPalette

Stará paleta

newPalette IColorPalette

a novú paletu.

OnPaletteChanging(Spoločnosť IColorPalette)

Volá sa, keď sa paleta mení.

protected override void OnPaletteChanging(IColorPalette oldPalette, IColorPalette newPalette)

Parameters

oldPalette IColorPalette

Stará paleta

newPalette IColorPalette

a novú paletu.

ReplaceColor(int, byte, int)

Zmení jednu farbu na druhú s povoleným rozdielom a zachováva pôvodnú hodnotu alfa, aby sa zachránili hladké okraje.

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

Parameters

oldColorArgb int

Staré farebné hodnoty ARGB by mali byť nahradené.

oldColorDiff byte

Povolený rozdiel v starej farbe, aby bolo možné rozšíriť nahradený tón farby.

newColorArgb int

Nová farba ARGB hodnoty nahradiť starú farbu.

ReplaceNonTransparentColors(int)

Nahradí všetky nešetrné farby novou farbou a zachováva pôvodnú hodnotu alfa, aby sa zachránili hladké okraje.Poznámka: Ak ho použijete na snímkach bez transparentnosti, všetky farby budú nahradené jedným.

public override void ReplaceNonTransparentColors(int newColorArgb)

Parameters

newColorArgb int

Nová farebná hodnota ARGB nahradí neprehľadné farby.

Resize(int, int, ImageResizeSettings)

Odstrániť tento príklad Aspose.Imaging.RasterCachedImage.

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

Parameters

newWidth int

Nová šírka

newHeight int

Nová výška

imageResizeSettings ImageResizeSettings

Odstrániť nastavenia.

SaveData(Stream)

Šetrí sa dáta.

protected override void SaveData(Stream stream)

Parameters

stream Stream

Stream na ukladanie údajov.

UpdateDimensions(a int, int)

Aktualizujte rozmery obrazu.

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

Nový obrázok šírka.

newHeight int

Nová výška obrazu.

 Slovenčina