Click or drag to resize

CefImage Methods

The CefImage type exposes the following members.

Methods
 NameDescription
Public methodAddBitmap Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the bitmap representation size in pixel coordinates. |pixel_data| is the array of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. |color_type| and |alpha_type| values specify the pixel format.
Public methodAddJpeg Create a JPEG image representation for |scale_factor|. |jpeg_data| is the image data of size |jpeg_data_size|. The JPEG format does not support transparency so the alpha byte will be set to 0xFF for all pixels.
Public methodAddPng Add a PNG image representation for |scale_factor|. |png_data| is the image data of size |png_data_size|. Any alpha transparency in the PNG data will be maintained.
Public methodStatic memberCreateImage Create a new CefImage. It will initially be empty. Use the Add*() methods to add representations at different scale factors.
Public methodDispose 
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize
(Overrides ObjectFinalize)
Public methodGetAsBitmap Returns the bitmap representation that most closely matches |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| values specify the desired output pixel format. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a CefBinaryValue containing the pixel data on success or NULL on failure.
Public methodGetAsJpeg Returns the JPEG representation that most closely matches |scale_factor|. |quality| determines the compression level with 0 == lowest and 100 == highest. The JPEG format does not support alpha transparency and the alpha channel, if any, will be discarded. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a CefBinaryValue containing the JPEG image data on success or NULL on failure.
Public methodGetAsPng Returns the PNG representation that most closely matches |scale_factor|. If |with_transparency| is true any alpha transparency in the image will be represented in the resulting PNG data. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a CefBinaryValue containing the PNG image data on success or NULL on failure.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetRepresentationInfo Returns information for the representation that most closely matches |scale_factor|. |actual_scale_factor| is the actual scale factor for the representation. |pixel_width| and |pixel_height| are the representation size in pixel coordinates. Returns true on success.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasRepresentation Returns true if this image contains a representation for |scale_factor|.
Public methodIsSame Returns true if this Image and |that| Image share the same underlying storage. Will also return true if both images are empty.
Public methodRemoveRepresentation Removes the representation for |scale_factor|. Returns true on success.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also