# Class TCefImageRef

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFImage

## Declaration

`type TCefImageRef = class(TCefBaseRefCountedRef, ICefImage)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefImageRef

## Overview

### Methods

| `function IsEmpty: Boolean;`
| `function IsSame(const that: ICefImage): Boolean;`
| `function AddBitmap(scaleFactor: Single; pixelWidth, pixelHeight: Integer; colorType: TCefColorType; alphaType: TCefAlphaType; const pixelData: Pointer; pixelDataSize: NativeUInt): Boolean;`
| `function AddPng(scaleFactor: Single; const pngData: Pointer; pngDataSize: NativeUInt): Boolean;`
| `function AddJpeg(scaleFactor: Single; const jpegData: Pointer; jpegDataSize: NativeUInt): Boolean;`
| `function GetWidth: NativeUInt;`
| `function GetHeight: NativeUInt;`
| `function HasRepresentation(scaleFactor: Single): Boolean;`
| `function RemoveRepresentation(scaleFactor: Single): Boolean;`
| `function GetRepresentationInfo(scaleFactor: Single; var actualScaleFactor: Single; var pixelWidth, pixelHeight: Integer): Boolean;`
| `function GetAsBitmap(scaleFactor: Single; colorType: TCefColorType; alphaType: TCefAlphaType; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`
| `function GetAsPng(scaleFactor: Single; withTransparency: Boolean; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`
| `function GetAsJpeg(scaleFactor: Single; quality: Integer; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`
| `class function UnWrap(data: Pointer): ICefImage;`
| `class function New: ICefImage;`

## Description

### Methods

| `function IsEmpty: Boolean;`
This item has no description. Showing description inherited from ICefImage.IsEmpty. Returns true (1) if this Image is NULL.

| `function IsSame(const that: ICefImage): Boolean;`
This item has no description. Showing description inherited from ICefImage.IsSame. Returns true (1) if this Image and |that| Image share the same underlying storage. Will also return true (1) if both images are NULL.

| `function AddBitmap(scaleFactor: Single; pixelWidth, pixelHeight: Integer; colorType: TCefColorType; alphaType: TCefAlphaType; const pixelData: Pointer; pixelDataSize: NativeUInt): Boolean;`

This item has no description. Showing description inherited from ICefImage.AddBitmap.

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.

| `function AddPng(scaleFactor: Single; const pngData: Pointer; pngDataSize: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefImage.AddPng. 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.

| `function AddJpeg(scaleFactor: Single; const jpegData: Pointer; jpegDataSize: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefImage.AddJpeg. 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.

| `function GetWidth: NativeUInt;`
This item has no description. Showing description inherited from ICefImage.GetWidth. Returns the image width in density independent pixel (DIP) units.

| `function GetHeight: NativeUInt;`
This item has no description. Showing description inherited from ICefImage.GetHeight. Returns the image height in density independent pixel (DIP) units.

| `function HasRepresentation(scaleFactor: Single): Boolean;`
This item has no description. Showing description inherited from ICefImage.HasRepresentation. Returns true (1) if this image contains a representation for |scale_factor|.

| `function RemoveRepresentation(scaleFactor: Single): Boolean;`
This item has no description. Showing description inherited from ICefImage.RemoveRepresentation. Removes the representation for |scale_factor|. Returns true (1) on success.

| `function GetRepresentationInfo(scaleFactor: Single; var actualScaleFactor: Single; var pixelWidth, pixelHeight: Integer): Boolean;`
This item has no description. Showing description inherited from ICefImage.GetRepresentationInfo. 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 (1) on success.

| `function GetAsBitmap(scaleFactor: Single; colorType: TCefColorType; alphaType: TCefAlphaType; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`

This item has no description. Showing description inherited from ICefImage.GetAsBitmap.

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 ICefBinaryValue containing the pixel data on success or NULL on failure.

| `function GetAsPng(scaleFactor: Single; withTransparency: Boolean; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`

This item has no description. Showing description inherited from ICefImage.GetAsPng.

Returns the PNG representation that most closely matches |scale_factor|. If |with_transparency| is true (1) 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 ICefBinaryValue containing the PNG image data on success or NULL on failure.

| `function GetAsJpeg(scaleFactor: Single; quality: Integer; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;`

This item has no description. Showing description inherited from ICefImage.GetAsJpeg.

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 ICefBinaryValue containing the JPEG image data on success or NULL on failure.

| `class function UnWrap(data: Pointer): ICefImage;`
This item has no description.

| `class function New: ICefImage;`
This item has no description.

Generated by PasDoc 0.17.0.snapshot.