6#ifndef iimg_CBitmap_included
7#define iimg_CBitmap_included
11#include <QtCore/QMutex>
81 static QVector<QRgb> s_colorTableGray;
82 static QMutex s_colorTableLock;
Generic color implementation with variable number of color components.
Base implementation of some iimg::IBitmap methods.
Bitmap implementation based on Qt QImage.
QByteArray GetFactoryId() const override
int GetPixelsDifference() const override
Get address difference between next and previous pixel.
bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d &size, istd::COptMemory &&data, int linesDifference=0) override
Create bitmap with specified size and format using external image data buffer.
CBitmap(const QImage &image)
bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
static QByteArray GetTypeName()
bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d &size, int pixelBitsCount=0, int componentsCount=0) override
Create bitmap with specified size and format.
istd::CIndex2d GetImageSize() const override
Get size of this raster image.
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
int GetPixelBitsCount() const override
Get total number of bits per single pixel.
bool IsFormatSupported(PixelFormat pixelFormat) const override
Get true if the pixel format is supported by the bitmap implementation.
icmm::CVarColor GetColorAt(const istd::CIndex2d &position) const override
Get color at specified pixel.
const QImage & GetQImage() const override
Gets a QImage object.
int GetComponentsCount() const override
Get number of color components.
const void * GetLinePtr(int positionY) const override
Get pointer to buffer for single line.
int GetLinesDifference() const override
Get address difference between next and previous line.
bool CopyImageFrom(const QImage &image) override
Copies the image data from a QImage object.
void ClearImage() override
Cleat this image.
CBitmap(const CBitmap &bitmap)
PixelFormat GetPixelFormat() const override
Get the bitmap's pixel format.
int GetSupportedOperations() const override
Get set of flags for supported operations.
void * GetLinePtr(int positionY) override
Get pointer to buffer for single line.
bool SetQImage(const QImage &image)
QImage::Format CalcQtFormat(PixelFormat pixelFormat) const
void ResetImage() override
Reset this image.
PixelFormat CalcFromQtFormat(QImage::Format imageFormat) const
PixelFormat
Bitmap pixel format description.
Interface for QImage object provider.
Index implementation for addressing elements in 2D-space.
Memory block with optional deleting function used during destruction.
Common interface for data model objects, which can be changed.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the system indenendent definitions of image and related themes.