Class CGImage
- Namespace
- CarinaStudio.MacOS.CoreGraphics
- Assembly
- CarinaStudio.AppBase.MacOS.dll
CGImage.
public class CGImage : CFObject, IShareableDisposable<CFObject>, IDisposable
- Inheritance
-
CGImage
- Implements
- Inherited Members
- Extension Methods
Constructors
CGImage(CGImage)
Initialize new CGImage instance.
public CGImage(CGImage source)
Parameters
sourceCGImageSource image to copy.
CGImage(CGImage, CGColorSpace)
Initialize new CGImage instance.
public CGImage(CGImage source, CGColorSpace colorSpace)
Parameters
sourceCGImageSource image to copy.
colorSpaceCGColorSpaceColor space.
CGImage(int, int, CGColorSpace)
public CGImage(int width, int height, CGColorSpace colorSpace)
Parameters
widthintWidth in pixels.
heightintHeight in pixels.
colorSpaceCGColorSpaceColor space.
CGImage(int, int, CGImagePixelFormatInfo, int, CGImageByteOrderInfo, int, CGImageAlphaInfo, CGColorSpace, CGColorRenderingIntent)
Initialize new empty CGImage instance.
public CGImage(int width, int height, CGImagePixelFormatInfo pixelFormat, int bitsPerComponent, CGImageByteOrderInfo byteOrder, int bytesPerRow, CGImageAlphaInfo alphaInfo, CGColorSpace colorSpace, CGColorRenderingIntent renderingIntent = CGColorRenderingIntent.Default)
Parameters
widthintWidth in pixels.
heightintHeight in pixels.
pixelFormatCGImagePixelFormatInfoPixel format.
bitsPerComponentintBits per component.
byteOrderCGImageByteOrderInfoByte order.
bytesPerRowintBytes per row.
alphaInfoCGImageAlphaInfoAlpha info.
colorSpaceCGColorSpaceColor space.
renderingIntentCGColorRenderingIntentRendering intent.
CGImage(int, int, CGImagePixelFormatInfo, int, CGImageByteOrderInfo, int, CGImageAlphaInfo, CGDataProvider, CGColorSpace, CGColorRenderingIntent)
Initialize new CGImage instance.
public CGImage(int width, int height, CGImagePixelFormatInfo pixelFormat, int bitsPerComponent, CGImageByteOrderInfo byteOrder, int bytesPerRow, CGImageAlphaInfo alphaInfo, CGDataProvider dataProvider, CGColorSpace colorSpace, CGColorRenderingIntent renderingIntent = CGColorRenderingIntent.Default)
Parameters
widthintWidth in pixels.
heightintHeight in pixels.
pixelFormatCGImagePixelFormatInfoPixel format.
bitsPerComponentintBits per component.
byteOrderCGImageByteOrderInfoByte order.
bytesPerRowintBytes per row.
alphaInfoCGImageAlphaInfoAlpha info.
dataProviderCGDataProviderProvider of data of image.
colorSpaceCGColorSpaceColor space.
renderingIntentCGColorRenderingIntentRendering intent.
Properties
AlphaInfo
Get alpha information of image.
public CGImageAlphaInfo AlphaInfo { get; }
Property Value
BitsPerPixel
Get number of bits for each pixel.
public int BitsPerPixel { get; }
Property Value
ByteOrder
Get byte order.
public CGImageByteOrderInfo ByteOrder { get; }
Property Value
BytesPerRow
Get number of bytes for each row of image.
public int BytesPerRow { get; }
Property Value
ColorSpace
Get color space of image.
public CGColorSpace? ColorSpace { get; }
Property Value
DataProvider
Get CGDataProvider to access data of image.
public CGDataProvider DataProvider { get; }
Property Value
Height
Get height of image in pixels.
public int Height { get; }
Property Value
PixelFormat
Get pixel format.
public CGImagePixelFormatInfo PixelFormat { get; }
Property Value
Width
Get width of image in pixels.
public int Width { get; }
Property Value
Methods
FromData(CFData)
Create CGImage from data.
public static CGImage FromData(CFData data)
Parameters
dataCFDataData.
Returns
FromFile(string)
Create CGImage from file.
public static CGImage FromFile(string fileName)
Parameters
fileNamestringFile name.
Returns
FromStream(Stream)
Create CGImage from data.
public static CGImage FromStream(Stream stream)
Parameters
streamStreamStream.
Returns
OnRelease()
Called when releasing instance.
public override void OnRelease()