Class Pixbuf
- Namespace
- GdkPixbuf
- Assembly
- GdkPixbuf-2.0.dll
public class Pixbuf : Object, IObject, INotifyPropertyChanged, IDisposable, Icon, LoadableIcon, IHandle, GTypeProvider
- Inheritance
-
Pixbuf
- Implements
- Inherited Members
Constructors
Pixbuf(bool, params ConstructArgument[])
protected Pixbuf(bool owned, params ConstructArgument[] constructArguments)
Parameters
owned
boolconstructArguments
ConstructArgument[]
Pixbuf(IntPtr, bool)
protected Pixbuf(IntPtr ptr, bool ownedRef)
Parameters
Fields
BitsPerSamplePropertyDefinition
public static readonly Property<int, Pixbuf> BitsPerSamplePropertyDefinition
Field Value
ColorspacePropertyDefinition
public static readonly Property<Colorspace, Pixbuf> ColorspacePropertyDefinition
Field Value
HasAlphaPropertyDefinition
public static readonly Property<bool, Pixbuf> HasAlphaPropertyDefinition
Field Value
HeightPropertyDefinition
public static readonly Property<int, Pixbuf> HeightPropertyDefinition
Field Value
NChannelsPropertyDefinition
public static readonly Property<int, Pixbuf> NChannelsPropertyDefinition
Field Value
PixelBytesPropertyDefinition
public static readonly Property<Bytes, Pixbuf> PixelBytesPropertyDefinition
Field Value
PixelsPropertyDefinition
public static readonly Property<IntPtr, Pixbuf> PixelsPropertyDefinition
Field Value
RowstridePropertyDefinition
public static readonly Property<int, Pixbuf> RowstridePropertyDefinition
Field Value
WidthPropertyDefinition
public static readonly Property<int, Pixbuf> WidthPropertyDefinition
Field Value
Properties
BitsPerSample
public int BitsPerSample { get; }
Property Value
Colorspace
public Colorspace Colorspace { get; }
Property Value
HasAlpha
public bool HasAlpha { get; }
Property Value
Height
public int Height { get; }
Property Value
NChannels
public int NChannels { get; }
Property Value
PixelBytes
public Bytes PixelBytes { get; }
Property Value
Pixels
public IntPtr Pixels { get; }
Property Value
Rowstride
public int Rowstride { get; }
Property Value
Width
public int Width { get; }
Property Value
Methods
AddAlpha(bool, byte, byte, byte)
public Pixbuf AddAlpha(bool substituteColor, byte r, byte g, byte b)
Parameters
Returns
ApplyEmbeddedOrientation()
[Version("2.12")]
public Pixbuf? ApplyEmbeddedOrientation()
Returns
CalculateRowstride(Colorspace, bool, int, int, int)
[Version("2.36.8")]
public static int CalculateRowstride(Colorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height)
Parameters
colorspace
ColorspacehasAlpha
boolbitsPerSample
intwidth
intheight
int
Returns
Composite(Pixbuf, int, int, int, int, double, double, double, double, InterpType, int)
public void Composite(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType interpType, int overallAlpha)
Parameters
dest
PixbufdestX
intdestY
intdestWidth
intdestHeight
intoffsetX
doubleoffsetY
doublescaleX
doublescaleY
doubleinterpType
InterpTypeoverallAlpha
int
CompositeColor(Pixbuf, int, int, int, int, double, double, double, double, InterpType, int, int, int, int, uint, uint)
public void CompositeColor(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType interpType, int overallAlpha, int checkX, int checkY, int checkSize, uint color1, uint color2)
Parameters
dest
PixbufdestX
intdestY
intdestWidth
intdestHeight
intoffsetX
doubleoffsetY
doublescaleX
doublescaleY
doubleinterpType
InterpTypeoverallAlpha
intcheckX
intcheckY
intcheckSize
intcolor1
uintcolor2
uint
CompositeColorSimple(int, int, InterpType, int, int, uint, uint)
public Pixbuf? CompositeColorSimple(int destWidth, int destHeight, InterpType interpType, int overallAlpha, int checkSize, uint color1, uint color2)
Parameters
destWidth
intdestHeight
intinterpType
InterpTypeoverallAlpha
intcheckSize
intcolor1
uintcolor2
uint
Returns
Copy()
public Pixbuf? Copy()
Returns
CopyArea(int, int, int, int, Pixbuf, int, int)
public void CopyArea(int srcX, int srcY, int width, int height, Pixbuf destPixbuf, int destX, int destY)
Parameters
CopyOptions(Pixbuf)
[Version("2.36")]
public bool CopyOptions(Pixbuf destPixbuf)
Parameters
destPixbuf
Pixbuf
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
Equal(Icon?)
public bool Equal(Icon? icon2)
Parameters
icon2
Icon
Returns
Fill(uint)
public void Fill(uint pixel)
Parameters
pixel
uint
Flip(bool)
[Version("2.6")]
public Pixbuf? Flip(bool horizontal)
Parameters
horizontal
bool
Returns
GetBitsPerSample()
public int GetBitsPerSample()
Returns
GetByteLength()
[Version("2.26")]
public nuint GetByteLength()
Returns
GetColorspace()
public Colorspace GetColorspace()
Returns
GetFileInfo(string, out int, out int)
[Version("2.4")]
public static PixbufFormat? GetFileInfo(string filename, out int width, out int height)
Parameters
Returns
GetFileInfoFinish(AsyncResult, out int, out int)
[Version("2.32")]
public static PixbufFormat? GetFileInfoFinish(AsyncResult asyncResult, out int width, out int height)
Parameters
asyncResult
AsyncResultwidth
intheight
int
Returns
GetGType()
public static Type GetGType()
Returns
GetHasAlpha()
public bool GetHasAlpha()
Returns
GetHeight()
public int GetHeight()
Returns
GetNChannels()
public int GetNChannels()
Returns
GetOption(string)
public string? GetOption(string key)
Parameters
key
string
Returns
GetRowstride()
public int GetRowstride()
Returns
GetWidth()
public int GetWidth()
Returns
Hash()
public uint Hash()
Returns
InitModules(string)
[Version("2.40")]
public static bool InitModules(string path)
Parameters
path
string
Returns
Initialize()
Does common initialization tasks. Wrapper and subclasses can override here to perform immediate initialization.
protected override void Initialize()
Load(int, out string, Cancellable?)
public InputStream Load(int size, out string type, Cancellable? cancellable)
Parameters
size
inttype
stringcancellable
Cancellable
Returns
LoadFinish(AsyncResult, out string)
public InputStream LoadFinish(AsyncResult res, out string type)
Parameters
res
AsyncResulttype
string
Returns
New(Colorspace, bool, int, int, int)
public static Pixbuf? New(Colorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height)
Parameters
colorspace
ColorspacehasAlpha
boolbitsPerSample
intwidth
intheight
int
Returns
NewFromBytes(Bytes, Colorspace, bool, int, int, int, int)
[Version("2.32")]
public static Pixbuf NewFromBytes(Bytes data, Colorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride)
Parameters
Returns
NewFromFile(string)
public static Pixbuf? NewFromFile(string filename)
Parameters
filename
string
Returns
NewFromFileAtScale(string, int, int, bool)
[Version("2.6")]
public static Pixbuf? NewFromFileAtScale(string filename, int width, int height, bool preserveAspectRatio)
Parameters
Returns
NewFromFileAtSize(string, int, int)
[Version("2.4")]
public static Pixbuf? NewFromFileAtSize(string filename, int width, int height)
Parameters
Returns
NewFromInline(Span<byte>, bool)
public static Pixbuf NewFromInline(Span<byte> data, bool copyPixels)
Parameters
Returns
NewFromResource(string)
[Version("2.26")]
public static Pixbuf? NewFromResource(string resourcePath)
Parameters
resourcePath
string
Returns
NewFromResourceAtScale(string, int, int, bool)
[Version("2.26")]
public static Pixbuf? NewFromResourceAtScale(string resourcePath, int width, int height, bool preserveAspectRatio)
Parameters
Returns
NewFromStream(InputStream, Cancellable?)
[Version("2.14")]
public static Pixbuf? NewFromStream(InputStream stream, Cancellable? cancellable)
Parameters
stream
InputStreamcancellable
Cancellable
Returns
NewFromStreamAtScale(InputStream, int, int, bool, Cancellable?)
[Version("2.14")]
public static Pixbuf? NewFromStreamAtScale(InputStream stream, int width, int height, bool preserveAspectRatio, Cancellable? cancellable)
Parameters
stream
InputStreamwidth
intheight
intpreserveAspectRatio
boolcancellable
Cancellable
Returns
NewFromStreamFinish(AsyncResult)
[Version("2.24")]
public static Pixbuf? NewFromStreamFinish(AsyncResult asyncResult)
Parameters
asyncResult
AsyncResult
Returns
NewFromXpmData(string[])
public static Pixbuf NewFromXpmData(string[] data)
Parameters
data
string[]
Returns
NewSubpixbuf(int, int, int, int)
public Pixbuf NewSubpixbuf(int srcX, int srcY, int width, int height)
Parameters
Returns
ReadPixelBytes()
[Version("2.32")]
public Bytes ReadPixelBytes()
Returns
ReadPixels()
[Version("2.32")]
public IntPtr ReadPixels()
Returns
Ref()
public Pixbuf Ref()
Returns
RemoveOption(string)
[Version("2.36")]
public bool RemoveOption(string key)
Parameters
key
string
Returns
RotateSimple(PixbufRotation)
[Version("2.6")]
public Pixbuf? RotateSimple(PixbufRotation angle)
Parameters
angle
PixbufRotation
Returns
SaturateAndPixelate(Pixbuf, float, bool)
public void SaturateAndPixelate(Pixbuf dest, float saturation, bool pixelate)
Parameters
SaveToStreamFinish(AsyncResult)
[Version("2.24")]
public static bool SaveToStreamFinish(AsyncResult asyncResult)
Parameters
asyncResult
AsyncResult
Returns
SaveToStreamv(OutputStream, string, string[]?, string[]?, Cancellable?)
[Version("2.36")]
public bool SaveToStreamv(OutputStream stream, string type, string[]? optionKeys, string[]? optionValues, Cancellable? cancellable)
Parameters
stream
OutputStreamtype
stringoptionKeys
string[]optionValues
string[]cancellable
Cancellable
Returns
Savev(string, string, string[]?, string[]?)
public bool Savev(string filename, string type, string[]? optionKeys, string[]? optionValues)
Parameters
Returns
Scale(Pixbuf, int, int, int, int, double, double, double, double, InterpType)
public void Scale(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType interpType)
Parameters
dest
PixbufdestX
intdestY
intdestWidth
intdestHeight
intoffsetX
doubleoffsetY
doublescaleX
doublescaleY
doubleinterpType
InterpType
ScaleSimple(int, int, InterpType)
public Pixbuf? ScaleSimple(int destWidth, int destHeight, InterpType interpType)
Parameters
destWidth
intdestHeight
intinterpType
InterpType
Returns
Serialize()
[Version("2.38")]
public Variant? Serialize()
Returns
SetOption(string, string)
[Version("2.2")]
public bool SetOption(string key, string value)
Parameters
Returns
ToString()
[Version("2.20")]
public string? ToString()
Returns
Unref()
public void Unref()