Class GifFrameBlock
Nombre del espacio: Aspose.Imaging.FileFormats.Gif.Blocks Asamblea: Aspose.Imaging.dll (25.4.0)
Clase de GIF.
[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 ,y, IObjectWithBounds ,y, IRasterImageArgb32PixelLoader ,y, IRasterImageRawDataLoader ,y, IHasXmpData ,y, IHasMetadata ,y, IGifBlock ,y, IAnimationFrame
Miembros heredados
RasterCachedImage.CacheData() ,y, RasterCachedImage.Blend(Point, RasterImage, Rectangle, byte) ,y, RasterCachedImage.Resize(int, int, ResizeType) ,y, RasterCachedImage.Resize(int, int, ImageResizeSettings) ,y, RasterCachedImage.RotateFlip(RotateFlipType) ,y, RasterCachedImage.Rotate(float, bool, Color) ,y, RasterCachedImage.Crop(Rectangle) ,y, RasterCachedImage.Dither(DitheringMethod, int, IColorPalette) ,y, RasterCachedImage.Grayscale() ,y, RasterCachedImage.NormalizeHistogram() ,y, RasterCachedImage.BinarizeFixed(byte) ,y, RasterCachedImage.BinarizeOtsu() ,y, RasterCachedImage.BinarizeBradley(double, int) ,y, RasterCachedImage.BinarizeBradley(double) ,y, RasterCachedImage.AdjustBrightness(int) ,y, RasterCachedImage.AdjustContrast(float) ,y, RasterCachedImage.AdjustGamma(float, float, float) ,y, RasterCachedImage.AdjustGamma(float) ,y, RasterCachedImage.IsCached ,y, RasterImage.RemoveMetadata() ,y, RasterImage.Save(Stream, ImageOptionsBase, Rectangle) ,y, RasterImage.GetModifyDate(bool) ,y, RasterImage.Dither(DitheringMethod, int) ,y, RasterImage.Dither(DitheringMethod, int, IColorPalette) ,y, RasterImage.GetDefaultPixels(Rectangle, IPartialArgb32PixelLoader) ,y, RasterImage.GetDefaultRawData(Rectangle, IPartialRawDataLoader, RawDataSettings) ,y, RasterImage.GetDefaultArgb32Pixels(Rectangle) ,y, RasterImage.GetDefaultRawData(Rectangle, RawDataSettings) ,y, RasterImage.GetArgb32Pixel(int, int) ,y, RasterImage.GetPixel(int, int) ,y, RasterImage.SetArgb32Pixel(int, int, int) ,y, RasterImage.SetPixel(int, int, Color) ,y, RasterImage.ReadScanLine(int) ,y, RasterImage.ReadArgb32ScanLine(int) ,y, RasterImage.WriteScanLine(int, Color[]) ,y, RasterImage.WriteArgb32ScanLine(int, int[]) ,y, RasterImage.LoadPartialArgb32Pixels(Rectangle, IPartialArgb32PixelLoader) ,y, RasterImage.LoadPartialPixels(Rectangle, IPartialPixelLoader) ,y, RasterImage.LoadArgb32Pixels(Rectangle) ,y, RasterImage.LoadArgb64Pixels(Rectangle) ,y, RasterImage.LoadPartialArgb64Pixels(Rectangle, IPartialArgb64PixelLoader) ,y, RasterImage.LoadPixels(Rectangle) ,y, RasterImage.LoadCmykPixels(Rectangle) ,y, RasterImage.LoadCmyk32Pixels(Rectangle) ,y, RasterImage.LoadRawData(Rectangle, RawDataSettings, IPartialRawDataLoader) ,y, RasterImage.LoadRawData(Rectangle, Rectangle, RawDataSettings, IPartialRawDataLoader) ,y, RasterImage.SaveRawData(byte[], int, Rectangle, RawDataSettings) ,y, RasterImage.SaveArgb32Pixels(Rectangle, int[]) ,y, RasterImage.SavePixels(Rectangle, Color[]) ,y, RasterImage.SaveCmykPixels(Rectangle, CmykColor[]) ,y, RasterImage.SaveCmyk32Pixels(Rectangle, int[]) ,y, RasterImage.SetResolution(double, double) ,y, RasterImage.SetPalette(IColorPalette, bool) ,y, RasterImage.Resize(int, int, ImageResizeSettings) ,y, RasterImage.Rotate(float, bool, Color) ,y, RasterImage.Rotate(float) ,y, RasterImage.BinarizeFixed(byte) ,y, RasterImage.BinarizeOtsu() ,y, RasterImage.BinarizeBradley(double) ,y, RasterImage.BinarizeBradley(double, int) ,y, RasterImage.Blend(Point, RasterImage, Rectangle, byte) ,y, RasterImage.Blend(Point, RasterImage, byte) ,y, RasterImage.Grayscale() ,y, RasterImage.NormalizeHistogram() ,y, RasterImage.AdjustBrightness(int) ,y, RasterImage.AdjustContrast(float) ,y, RasterImage.AdjustGamma(float, float, float) ,y, RasterImage.AdjustGamma(float) ,y, RasterImage.GetSkewAngle() ,y, RasterImage.NormalizeAngle() ,y, RasterImage.NormalizeAngle(bool, Color) ,y, RasterImage.Filter(Rectangle, FilterOptionsBase) ,y, RasterImage.ReplaceColor(Color, byte, Color) ,y, RasterImage.ReplaceColor(int, byte, int) ,y, RasterImage.ReplaceNonTransparentColors(Color) ,y, RasterImage.ReplaceNonTransparentColors(int) ,y, RasterImage.ToBitmap() ,y, RasterImage.PremultiplyComponents ,y, RasterImage.UseRawData ,y, RasterImage.UpdateXmpData ,y, RasterImage.XmpData ,y, RasterImage.RawIndexedColorConverter ,y, RasterImage.RawCustomColorConverter ,y, RasterImage.RawFallbackIndex ,y, RasterImage.RawDataSettings ,y, RasterImage.UsePalette ,y, RasterImage.RawDataFormat ,y, RasterImage.RawLineSize ,y, RasterImage.IsRawDataAvailable ,y, RasterImage.HorizontalResolution ,y, RasterImage.VerticalResolution ,y, RasterImage.HasTransparentColor ,y, RasterImage.HasAlpha ,y, RasterImage.TransparentColor ,y, RasterImage.ImageOpacity ,y, Image.CanLoad(string) ,y, Image.CanLoad(string, LoadOptions) ,y, Image.CanLoad(Stream) ,y, Image.CanLoad(Stream, LoadOptions) ,y, Image.Create(ImageOptionsBase, int, int) ,y, Image.Create(Image[]) ,y, Image.Create(MultipageCreateOptions) ,y, Image.Create(string[], bool) ,y, Image.Create(string[]) ,y, Image.Create(Image[], bool) ,y, Image.GetFileFormat(string) ,y, Image.GetFileFormat(Stream) ,y, Image.GetFittingRectangle(Rectangle, int, int) ,y, Image.GetFittingRectangle(Rectangle, int[], int, int) ,y, Image.Load(string, LoadOptions) ,y, Image.Load(string) ,y, Image.Load(Stream, LoadOptions) ,y, Image.Load(Stream) ,y, Image.GetProportionalWidth(int, int, int) ,y, Image.GetProportionalHeight(int, int, int) ,y, Image.RemoveMetadata() ,y, Image.CanSave(ImageOptionsBase) ,y, Image.Resize(int, int) ,y, Image.Resize(int, int, ResizeType) ,y, Image.Resize(int, int, ImageResizeSettings) ,y, Image.GetDefaultOptions(object[]) ,y, Image.GetOriginalOptions() ,y, Image.ResizeWidthProportionally(int) ,y, Image.ResizeHeightProportionally(int) ,y, Image.ResizeWidthProportionally(int, ResizeType) ,y, Image.ResizeHeightProportionally(int, ResizeType) ,y, Image.ResizeWidthProportionally(int, ImageResizeSettings) ,y, Image.ResizeHeightProportionally(int, ImageResizeSettings) ,y, Image.RotateFlip(RotateFlipType) ,y, Image.Rotate(float) ,y, Image.Crop(Rectangle) ,y, Image.Crop(int, int, int, int) ,y, Image.Save() ,y, Image.Save(string) ,y, Image.Save(string, ImageOptionsBase) ,y, Image.Save(string, ImageOptionsBase, Rectangle) ,y, Image.Save(Stream, ImageOptionsBase) ,y, Image.Save(Stream, ImageOptionsBase, Rectangle) ,y, Image.GetSerializedStream(ImageOptionsBase, Rectangle, out int) ,y, Image.SetPalette(IColorPalette, bool) ,y, Image.BitsPerPixel ,y, Image.Bounds ,y, Image.Container ,y, Image.Height ,y, Image.Palette ,y, Image.UsePalette ,y, Image.Size ,y, Image.Width ,y, Image.InterruptMonitor ,y, Image.BufferSizeHint ,y, Image.AutoAdjustPalette ,y, Image.HasBackgroundColor ,y, Image.FileFormat ,y, Image.BackgroundColor ,y, DataStreamSupporter.CacheData() ,y, DataStreamSupporter.Save() ,y, DataStreamSupporter.Save(Stream) ,y, DataStreamSupporter.Save(string) ,y, DataStreamSupporter.Save(string, bool) ,y, DataStreamSupporter.DataStreamContainer ,y, DataStreamSupporter.IsCached ,y, DisposableObject.Dispose() ,y, DisposableObject.Disposed ,y, object.GetType() ,y, object.ToString() ,y, object.Equals(object?) ,y, object.Equals(object?, object?) ,y, object.ReferenceEquals(object?, object?) ,y, object.GetHashCode()
Constructors
GifFrameBlock(Por lo tanto, por lo tanto)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(ushort width, ushort height)
Parameters
width
ushort
La imagen es amplia.
height
ushort
La altura de la imagen.
Examples
Este ejemplo muestra cómo crear una imagen GIF y guardarla en un archivo.
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");
}
}
Este ejemplo muestra cómo crear una imagen GIF con una paleta personalizada y guardarla en un archivo.
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");
}
}
El siguiente ejemplo muestra cómo componer una imagen GIF animada de bloques GIF individuales.
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(Por ejemplo: Ushort, Ushort, Ushort, Ushort)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(ushort left, ushort top, ushort width, ushort height)
Parameters
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
width
ushort
La imagen es amplia.
height
ushort
La altura de la imagen.
GifFrameBlock(ushort, ushort, ushort, ushort, IColorPalette, bool, bool, byte)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(ushort left, ushort top, ushort width, ushort height, IColorPalette colorPalette, bool isPaletteSorted, bool isGifFrameInterlaced, byte bitsPerPixel)
Parameters
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
width
ushort
La imagen es amplia.
height
ushort
El tamaño de la imagen.
colorPalette
IColorPalette
La paleta de colores.
isPaletteSorted
bool
Si se ajusta a ‘verdadera’ la paleta de colores se clasifica.
isGifFrameInterlaced
bool
Si se establece para “verdad” el marco GIF se interlaza.
bitsPerPixel
byte
Los bits por pixel.
GifFrameBlock(RasterImage)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(RasterImage image)
Parameters
image
RasterImage
La imagen para iniciar el pixel de marco y los datos de paleta con.
GifFrameBlock(Título: Ushort, Ushort y Ushort)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(RasterImage image, ushort left, ushort top)
Parameters
image
RasterImage
La imagen para iniciar el pixel de marco y los datos de paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
GifFrameBlock(RasterImage, ushort, ushort, bool, bool, byte)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(RasterImage image, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)
Parameters
image
RasterImage
La imagen para iniciar el pixel de marco y los datos de paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
isPaletteSorted
bool
Si se ajusta a ‘verdadera’ la paleta de colores se clasifica.
isGifFrameInterlaced
bool
Si se establece para “verdad” el marco GIF se interlaza.
lzwCodeSize
byte
Los bits por pixel.
GifFrameBlock(Stream)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(Stream stream)
Parameters
stream
Stream
El flujo para cargar una imagen y inicializar los pixel de marco y los datos de paleta con.
GifFrameBlock(El flujo, ushort, ushort)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(Stream stream, ushort left, ushort top)
Parameters
stream
Stream
El flujo para cargar una imagen y inicializar los pixel de marco y los datos de paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
GifFrameBlock(Stream, ushort, ushort, bool, bool, byte)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(Stream stream, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)
Parameters
stream
Stream
El flujo para cargar una imagen y inicializar los pixel de marco y los datos de paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
isPaletteSorted
bool
Si se ajusta a ‘verdadera’ la paleta de colores se clasifica.
isGifFrameInterlaced
bool
Si se establece para “verdad” el marco GIF se interlaza.
lzwCodeSize
byte
Los bits por pixel.
GifFrameBlock(El string)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(string path)
Parameters
path
string
El camino para cargar una imagen y iniciar los datos de pixel y paleta con.
GifFrameBlock(Escocia, Ushort y Ushort)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(string path, ushort left, ushort top)
Parameters
path
string
El camino para cargar una imagen y iniciar los datos de pixel y paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
GifFrameBlock(Esquema, ushort, ushort, bool, bool, byte)
Inicia una nueva instancia de la clase Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.
public GifFrameBlock(string path, ushort left, ushort top, bool isPaletteSorted, bool isGifFrameInterlaced, byte lzwCodeSize)
Parameters
path
string
El camino para cargar una imagen y iniciar los datos de pixel y paleta con.
left
ushort
La posición de la imagen izquierda.
top
ushort
La posición superior de la imagen.
isPaletteSorted
bool
Si se ajusta a ‘verdadera’ la paleta de colores se clasifica.
isGifFrameInterlaced
bool
Si se establece para “verdad” el marco GIF se interlaza.
lzwCodeSize
byte
Los bits por pixel.
Fields
ExtensionLabel
etiqueta de extensión de bloque.
public const int ExtensionLabel = 44
Valor de campo
ImageDescriptorSize
tamaño de la imagen descriptor.
public const int ImageDescriptorSize = 10
Valor de campo
Properties
BackgroundColor
Obtenga o establece un valor para el color de fondo.
public override Color BackgroundColor { get; set; }
Valor de la propiedad
BitsPerPixel
Recibe los bits de la imagen por cuenta de píxeles.
public override int BitsPerPixel { get; }
Valor de la propiedad
ControlBlock
Obtenga el bloque de control gráfico asociado con este bloque.
public GifGraphicsControlBlock ControlBlock { get; }
Valor de la propiedad
DisposalMethod
Tiene el método de disolución.
public AnimationDisposalMethods DisposalMethod { get; }
Valor de la propiedad
FileFormat
Obtener un valor de formato de archivo
public override FileFormat FileFormat { get; }
Valor de la propiedad
Flags
Toma o pone las banderas.
public byte Flags { get; set; }
Valor de la propiedad
FrameLeft
Tiene la izquierda.
public int FrameLeft { get; }
Valor de la propiedad
FrameTime
Obtenga o establece la duración.
public int FrameTime { get; set; }
Valor de la propiedad
FrameTop
Convertido en p.
public int FrameTop { get; }
Valor de la propiedad
GifFrameBitsPerPixel
Obtenga o establece los bits de frame GIF por pixel.
public byte GifFrameBitsPerPixel { get; set; }
Valor de la propiedad
HasTransparentColor
Recibe un valor que indica si el bloque de marco tiene un color transparente.
public override bool HasTransparentColor { get; set; }
Valor de la propiedad
Height
Obtenga la altura de la imagen.
public override int Height { get; }
Valor de la propiedad
Interlaced
Obtenga o establece un valor que indica si este Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock está interligado.
public bool Interlaced { get; set; }
Valor de la propiedad
IsInterlaced
Recibe un valor que indica si esta imagen es interligada.
public bool IsInterlaced { get; }
Valor de la propiedad
IsPaletteSorted
Obtenga o establece un valor que indique si la paleta de colores está ordenada.
public bool IsPaletteSorted { get; set; }
Valor de la propiedad
Left
Obtenga o establece la ubicación de la imagen izquierda.
[JsonProperty]
public ushort Left { get; set; }
Valor de la propiedad
Top
Obtenga o coloca la ubicación de la imagen superior.
[JsonProperty]
public ushort Top { get; set; }
Valor de la propiedad
TransparentColor
Obtenga el color transparente del bloque de marco.
public override Color TransparentColor { get; set; }
Valor de la propiedad
UseAlphaBlending
Recibe un valor que indica si [utilizar alfa mezclar].
public bool UseAlphaBlending { get; }
Valor de la propiedad
Width
Obtenga la ancho de la imagen.
public override int Width { get; }
Valor de la propiedad
Methods
AdjustBrightness(Int)
Ajuste de un brillo para la imagen.
public override void AdjustBrightness(int brightness)
Parameters
brightness
int
Valor de brillo.
CreateFlags(Pintura, Pintura, Pintura)
Crean las banderas.
public static byte CreateFlags(IColorPalette colorPalette, bool isPaletteSorted, bool isGifFrameInterlaced)
Parameters
colorPalette
IColorPalette
La paleta de colores.
isPaletteSorted
bool
si se establece para ‘verdadera’ los colores en la paleta de colores se clasifican.
isGifFrameInterlaced
bool
si se establece para ‘verdad’ la imagen de la ficha GIF se interlaza.
Returns
Las banderas creadas.
GetColorPalette(Coloración, Coloración, Coloración)
Obtenga la paleta de color asociada.
public static IColorPalette GetColorPalette(IColorPalette framePalette, IColorPalette containerPalette)
Parameters
framePalette
IColorPalette
El marco de la paleta.
containerPalette
IColorPalette
La paleta de contenedores.
Returns
La paleta de colores.
GetFullFrame()
Tiene el marco completo.
public RasterImage GetFullFrame()
Returns
RasterImage con un marco completo
Exceptions
GetOriginalOptions()
Obtenga las opciones basadas en las configuraciones de archivo original.Esto puede ser útil para mantener la profundidad del bit y otros parámetros de la imagen original sin cambios.Por ejemplo, si cargamos una imagen de PNG en blanco y negro con 1 bito por píxel y luego la guardamos utilizando elAspose.Imaging.DataStreamSupporter.Save(System.String) método, la imagen PNG de salida con 8 bits por pixel se producir.Para evitarlo y ahorrar la imagen PNG con 1 bits por píxel, utilice este método para obtener las opciones de ahorro correspondientes y pasarlaspara el método Aspose.Imaging.Image.Save(System.String,Aspose.Imaging.ImageOptionsBase) como el segundo parámetro.
public override ImageOptionsBase GetOriginalOptions()
Returns
Las opciones basadas en las configuraciones de archivo original.
OnPaletteChanged(Coloración, Coloración, Coloración)
Se llama cuando se cambia la paleta.
protected override void OnPaletteChanged(IColorPalette oldPalette, IColorPalette newPalette)
Parameters
oldPalette
IColorPalette
La vieja paleta.
newPalette
IColorPalette
La nueva paleta.
OnPaletteChanging(Coloración, Coloración, Coloración)
Se llama cuando la paleta cambia.
protected override void OnPaletteChanging(IColorPalette oldPalette, IColorPalette newPalette)
Parameters
oldPalette
IColorPalette
La vieja paleta.
newPalette
IColorPalette
La nueva paleta.
ReplaceColor(Int, byte y int)
Reemplaza una color por otra con la diferencia permitida y conserva el valor alfa original para ahorrar lados suaves.
public override void ReplaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)
Parameters
oldColorArgb
int
El antiguo color ARGB será reemplazado.
oldColorDiff
byte
Permite la diferencia en el color antiguo para poder ampliar el tono de color sustituido.
newColorArgb
int
Nuevo valor de color ARGB para reemplazar el color antiguo.
ReplaceNonTransparentColors(Int)
Reemplaza todos los colores no transparentes con un nuevo color y conserva el valor alfa original para ahorrar lados suaves.Nota: si lo usa en imágenes sin transparencia, todos los colores serán reemplazados por un único.
public override void ReplaceNonTransparentColors(int newColorArgb)
Parameters
newColorArgb
int
Nuevo valor de color ARGB para reemplazar los colores no transparentes con.
Resize(int, int, ImageResizeSettings)
Revisa esta instancia Aspose.Imaging.RasterCachedImage.
public override void Resize(int newWidth, int newHeight, ImageResizeSettings imageResizeSettings)
Parameters
newWidth
int
Nueva ampliación.
newHeight
int
Nueva altura.
imageResizeSettings
ImageResizeSettings
Recuperar las configuraciones.
SaveData(Stream)
ahorrar los datos.
protected override void SaveData(Stream stream)
Parameters
stream
Stream
El flujo para salvar los datos a.
UpdateDimensions(El int, int)
Actualizar las dimensiones de la imagen.
protected override void UpdateDimensions(int newWidth, int newHeight)
Parameters
newWidth
int
La nueva imagen es amplia.
newHeight
int
El nuevo tamaño de la imagen.