Trivial class to store elementary info about bitmap graphics.
More...
#include <imageInfo.h>
|
static QList< imageInfo > | readAll (const QString &fileName) |
| Construct image infos for all images in a file. More...
|
|
Trivial class to store elementary info about bitmap graphics.
Definition at line 30 of file imageInfo.h.
◆ imageInfo() [1/3]
Default constructor.
The default constructor sets all values to zero and clears the error string.
◆ imageInfo() [2/3]
imageInfo::imageInfo |
( |
const QImage & |
image | ) |
|
|
inline |
Constructs an image info from a QImage.
This constructor simply calls read(const QImage &)
- Parameters
-
image | A QImage whose data is read |
Definition at line 49 of file imageInfo.h.
◆ imageInfo() [3/3]
imageInfo::imageInfo |
( |
const QString & |
fileName | ) |
|
|
inlineexplicit |
Constructs an image info from a file.
This constructor simply calls read(const QString &)
- Parameters
-
fileName | Name of input image file |
Definition at line 59 of file imageInfo.h.
◆ isEmpty()
bool imageInfo::isEmpty |
( |
| ) |
const |
|
inline |
Checks if image is empty.
- Returns
- True if width or height are zero
Definition at line 112 of file imageInfo.h.
◆ operator QString()
imageInfo::operator QString |
( |
| ) |
const |
|
inline |
Converts the image info to a human readable string.
This is useful mainly for debugging purposes
- Returns
- QString describing the image
Definition at line 138 of file imageInfo.h.
◆ read() [1/2]
bool imageInfo::read |
( |
const QImage & |
image | ) |
|
Reads image info from a QImage.
- Parameters
-
image | A QImage whose data is read |
- Returns
- False if the image has format QImage::Format_Invalid, and True otherwise.
◆ read() [2/2]
bool imageInfo::read |
( |
const QString & |
fileName | ) |
|
Read image info from an image file.
This method reads an image file and inteprets the information found there. If the file contains more than one image (e.g. if the file is a multi-page TIFF file), only the first image is considered.
If fileName points to a JPEG or JPEG2000 file (in JP2 or JPX format), the data is read without decoding the image data. The method is therefore rather inexpensive in these cases. In case of error, an error message is saved in the 'error' member, and all other members are set to their default values.
- Parameters
-
fileName | Name of an image file in JBIG2, JPEG or JPEG2000 format, or in any other format that Qt can read. |
- Returns
- False if the image file could not be read, and True otherwise.
◆ readAll()
static QList<imageInfo> imageInfo::readAll |
( |
const QString & |
fileName | ) |
|
|
static |
Construct image infos for all images in a file.
This method constructs an image info for every image contained in the file.
- Note
- Currently, only TIFF and JBIG2 files are supported. For all other file types, only the first image is read.
- Parameters
-
fileName | Name of an image file in JBIG2, JPEG or JPEG2000 format, or in any other format that Qt can read. |
- Returns
- A list of image infos, or an empty list in case of error
◆ xResolution()
Vertical resolution.
- Returns
- Vertical resolution
Definition at line 120 of file imageInfo.h.
◆ yResolution()
Horizontal resolution.
- Returns
- Horizontal resolution
Definition at line 128 of file imageInfo.h.
The documentation for this class was generated from the following file:
- /home/kebekus/Software/projects/scantools/src/libscantools/imageInfo.h