[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.Indexed8bppBitmap

Class Indexed8bppBitmap

Namespace
GrapeCity.Documents.Imaging
Assembly
GcDocs.Imaging.dll

Represents a palette-color image with 8 bits per pixel.

public class Indexed8bppBitmap : IImage, IDisposable
Inheritance
object
Indexed8bppBitmap
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Indexed8bppBitmap(int, int, bool, bool, float, float)

Initializes a new instance of the Indexed8bppBitmap class.

public Indexed8bppBitmap(int pixelWidth, int pixelHeight, bool opaque, bool premultiplied = false, float dpiX = 96, float dpiY = 96)

Parameters

pixelWidth int

The width of the image, in pixels.

pixelHeight int

The height of the image, in pixels.

opaque bool

Indicates whether the alpha channel should be ignored.

premultiplied bool

Indicates whether the color channels for all pixels are premultiplied by the alpha channel.

dpiX float

The horizontal dpi of the image.

dpiY float

The vertical dpi of the image.

Properties

ColorMap

Gets the associated lookup table with 256 Red-Green-Blue[-Alpha] palette entries.

public PaletteEntry[] ColorMap { get; }

Property Value

PaletteEntry[]

DpiX

Gets the horizontal dpi of the bitmap.

public float DpiX { get; }

Property Value

float

DpiY

Gets the vertical dpi of the bitmap.

public float DpiY { get; }

Property Value

float

ExifProfile

Gets or sets an instance of ExifProfile with Exif metadata of the image.

public ExifProfile ExifProfile { get; set; }

Property Value

ExifProfile

IccProfileData

Gets or sets the raw ICC profile data.

public byte[] IccProfileData { get; set; }

Property Value

byte[]

IsDisposed

Gets a value indicating whether the Indexed8bppBitmap has been disposed of.

public bool IsDisposed { get; }

Property Value

bool

this[int, int]

Gets or sets a lookup table index (from 0 to 255) at the specified coordinates.

public int this[int x, int y] { get; set; }

Parameters

x int

The X coordinate.

y int

The Y coordinate.

Property Value

int

Opaque

Gets or sets a value indicating whether the alpha channel of the image should be ignored.

public bool Opaque { get; set; }

Property Value

bool

PixelHeight

Gets the pixel height of the image.

public int PixelHeight { get; }

Property Value

int

PixelWidth

Gets the pixel width of the image.

public int PixelWidth { get; }

Property Value

int

Premultiplied

Gets or sets a value indicating if the color channels for all pixels are premultiplied by the alpha channel.

public bool Premultiplied { get; set; }

Property Value

bool

RawData

Gets a pointer to the internal binary data.

public IntPtr RawData { get; }

Property Value

System.IntPtr

Rotation

Gets the flip and rotate transformations that must be applied to the image.

public FlipRotateAction Rotation { get; }

Property Value

FlipRotateAction

Methods

ApplyLicenseKey(string)

Applies a license key to an instance of Indexed8bppBitmap.

public void ApplyLicenseKey(string key)

Parameters

key string

The license key to set.

Clear(int, Rectangle)

Clears the Indexed8bppBitmap with the specified lookup table index (from 0 to 255).

public void Clear(int value, Rectangle rect)

Parameters

value int

The lookup table index (from 0 to 255) to fill the image.

rect System.Drawing.Rectangle

The target rectangle of the Indexed8bppBitmap.

Clear(int)

Clears the Indexed8bppBitmap with the specified lookup table index (from 0 to 255).

public void Clear(int value)

Parameters

value int

The lookup table index (from 0 to 255) to fill the image.

Clip(Rectangle)

Creates a new Indexed8bppBitmap with a fragment of the image.

public Indexed8bppBitmap Clip(Rectangle rect)

Parameters

rect System.Drawing.Rectangle

Clipping rectangle of the source image to be extracted as a new Indexed8bppBitmap.

Returns

Indexed8bppBitmap

Clone(bool)

Creates a new Indexed8bppBitmap with a copy of the image.

public Indexed8bppBitmap Clone(bool cloneExif = false)

Parameters

cloneExif bool

Specifies whether the Exif metadata should be cloned (if exist), not just copied as a reference.

Returns

Indexed8bppBitmap

CompactPalette(bool)

Compacts the image palette to 8 bits per color channel and returns the palette as an array of 32-bit ARGB values.

public uint[] CompactPalette(bool allowSemitransparency = false)

Parameters

allowSemitransparency bool

Indicates if the alpha channel supports values between 0 and 255 (if true), or the boundary values only (if false).

Returns

uint[]

Dispose()

Clean up any resources being used.

public void Dispose()

Dispose(bool)

Performs cleanup operations on managed and unmanaged resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~Indexed8bppBitmap()

Performs cleanup operations on unmanaged resources.

protected ~Indexed8bppBitmap()

SetDpi(float, float)

Changes the physical resolution of the image.

public void SetDpi(float dpiX, float dpiY)

Parameters

dpiX float

The horizontal resolution.

dpiY float

The vertical resolution.

SetDpi(float)

Changes the physical resolution of the image.

public void SetDpi(float dpi)

Parameters

dpi float

The horizontal and vertical resolution.

ToGcBitmap()

Creates an instance of the GcBitmap class from the current Indexed8bppBitmap.

public GcBitmap ToGcBitmap()

Returns

GcBitmap

A new instance of the GcBitmap class.

ToGcBitmap(GcBitmap, bool)

Copies the image into an existing instance of GcBitmap.

public void ToGcBitmap(GcBitmap bmp, bool cloneExif)

Parameters

bmp GcBitmap

The target GcBitmap object.

cloneExif bool

Specifies whether the Exif metadata should be cloned (if exist), not just copied as a reference.