Image Formats NG
|
ImageHeader class contains common properties for all images. More...
Public Member Functions | |
ImageHeader () | |
Constructs a null header. | |
ImageHeader (const ImageHeader &) | |
Constructs a shallow copy of the given other header. | |
ImageHeader (ImageHeader &&) | |
Move-constructs a ImageHeader instance, making it point at the same object that other was pointing to. | |
~ImageHeader () | |
Destroys the ImageHeader object. | |
ImageHeader & | operator= (const ImageHeader &) |
Assigns a shallow copy of the other header to this header and returns a reference to this header. | |
ImageHeader & | operator= (ImageHeader &&) |
Move-assigns other to this ImageHeader instance. | |
bool | validate (QString *error=nullptr) const |
This method checks that parameters passed to the header are valid. More... | |
Properties | |
bool | isNull |
Returns true if all fields have default values. | |
ImageResource::Type | type |
This property holds the type of an image. More... | |
QImage::Format | imageFormat |
This property holds the format of an image. | |
QSize | size |
This property holds the size of an image. More... | |
int | width |
This property holds the width of an image. More... | |
int | height |
This property holds the width of an image. More... | |
int | depth |
This property holds the width of an image. More... | |
QString | name |
This property holds the name of an image. More... | |
int | imageCount |
This property holds the count of images in the ImageContents object. More... | |
bool | hasMipmaps |
This property holds whether ImageContents object has mipmaps or not. More... | |
int | mipmapCount |
This property holds the number of mipmaps in the ImageContents object. More... | |
int | frameDelay |
This property holds the delay (in milliseconds) between frames of the animation. | |
int | loopCount |
This property holds the animation's loop count or -1 in case of infinite loop count. | |
Friends | |
bool IMAGEFORMATSNG_EXPORT | operator== (const ImageHeader &lhs, const ImageHeader &rhs) |
Returns true if the lhs header and the rhs header have the same contents; otherwise returns false. | |
bool IMAGEFORMATSNG_EXPORT | operator!= (const ImageHeader &lhs, const ImageHeader &rhs) |
Returns true if the lhs header and the rhs header have different contents; otherwise returns false. | |
ImageHeader class contains common properties for all images.
bool ImageHeader::validate | ( | QString * | error = nullptr | ) | const |
This method checks that parameters passed to the header are valid.
The message describing what's wrong is written to the given error variable.
|
readwrite |
This property holds the width of an image.
|
readwrite |
This property holds whether ImageContents object has mipmaps or not.
Mipmaps are the series of images, each image 2 times smaller than the previous. For example: 8x8, 4x4, 2x2, 1x1.
|
readwrite |
This property holds the width of an image.
|
readwrite |
This property holds the count of images in the ImageContents object.
This property is used to represent number of frames or elements in image array.
|
read |
This property holds the number of mipmaps in the ImageContents object.
If ImageHeader::hasMipmaps property is true, this property holds 1, otherwise it hols the number calculated as log2(max(width, height, depth)) + 1.
|
readwrite |
This property holds the name of an image.
In case if image format does not support name, name will be lost when saving ImageContents.
|
readwrite |
This property holds the size of an image.
|
readwrite |
This property holds the type of an image.
Possible types are image, cube texture or volume texture.
|
readwrite |
This property holds the width of an image.