48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
|
#ifndef IMAGEINFO_H
|
||
|
#define IMAGEINFO_H
|
||
|
#include <QObject>
|
||
|
#include <QSize>
|
||
|
#include <string>
|
||
|
#include <QDate>
|
||
|
#include <QUrl>
|
||
|
namespace CCS_Report {
|
||
|
|
||
|
enum IMAGE_FORMAT{
|
||
|
BMP_FORMAT,
|
||
|
JPG_FORMAT,
|
||
|
GIF_FORMAT,
|
||
|
PNG_FORMAT,
|
||
|
NVL_FORMAT,
|
||
|
SVG_FORMAT
|
||
|
};
|
||
|
class ImageInfo:public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
ImageInfo(QObject *parent=0);
|
||
|
~ImageInfo();
|
||
|
|
||
|
public:
|
||
|
QString getImageFormat(QString imageUrl);
|
||
|
QString getImageSize(QString imageUrl);
|
||
|
QSize getImageDimension(QString imageUrl);
|
||
|
QDate getImageDate(QString imageUrl);
|
||
|
QString getImageTitle(QString imageUrl);
|
||
|
int getImageFormat(std::string path);
|
||
|
|
||
|
private:
|
||
|
long getBMPSize(std::string path);
|
||
|
long getGIFSize(std::string path);
|
||
|
long getPNGSize(std::string path);
|
||
|
long getJPGSize(std::string path);
|
||
|
|
||
|
QSize getBMPDimension(std::string path);
|
||
|
QSize getPNGDimension(std::string path);
|
||
|
QSize getJPGDimension(std::string path);
|
||
|
QSize getGIFDimension(std::string path);
|
||
|
QSize getSVGDimension(QString path);
|
||
|
};
|
||
|
}
|
||
|
#endif // IMAGEINFO_H
|