Class IBitmapData#
Defined in File libCZI_Pixels.h
Class Documentation#
-
class IBitmapData#
This interface is used to represent a bitmap.
In order to access the pixel data, the Lock-method must be called. The information returned from the Lock-method is to be considered valid only until Unlock is called. If a bitmap is destroyed while it is locked, this is considered to be a fatal error. It is legal to call Lock multiple times, but the calls to Lock and Unlock must be balanced.
Public Functions
-
virtual IntSize GetSize() const = 0#
Gets the size of the bitmap (i.e. its width and height in pixels).
- Returns:
The size (in pixels).
-
virtual BitmapLockInfo Lock() = 0#
Gets a data structure allowing for direct access of the bitmap.
The BitmapLockInfo returned must only be considered to be valid until Unlock is called. It is legal to call Lock multiple time (also from different threads concurrently). In any case, calls to Lock and Unlock must be balanced. It is considered to be a fatal error if the object is destroyed when it is locked.
- Returns:
The BitmapLockInfo allowing to directly access the data representing the bitmap.
-
virtual void Unlock() = 0#
Inform the bitmap object that the data (previously retrieved by a call to Lock) is no longer used. If Unlock is called with the lock-count being zero, an exception of type std::logic_error will be thrown (and the lock-count will be unchanged).
The BitmapLockInfo returned must only be considered to be valid until Unlock is called.
-
virtual int GetLockCount() const = 0#
Get the lock count. Note that this value is only momentarily valid.
- Returns:
The lock count.
-
inline virtual ~IBitmapData()#
-
inline std::uint32_t GetWidth() const#
Gets the width of the bitmap in pixels.
- Returns:
The width in pixels.
-
inline std::uint32_t GetHeight() const#
Gets the height of the bitmap in pixels.
- Returns:
The height in pixels
-
virtual IntSize GetSize() const = 0#