FactDev  0.1
Gui::Utils::Image Class Reference

The Image class Contains generic methods on image formats. More...

#include <image.h>

Static Public Member Functions

static QByteArray imageToBytes (QImage image, const QString ext="PNG")
 Image::imageToBytes Return a QByteArray of the QImage image More...
 
static QByteArray pixmapToBytes (const QPixmap pix, const QString ext="PNG")
 Image::pixmapToBytes Return a QByteArray of the QPixmap image More...
 
static QImage pixmapToImage (const QPixmap pix)
 Image::pixmapToImage Return a QImage of QPixmap image More...
 
static QPixmap bytesToPixmap (const QByteArray bytes)
 Image::BytesToPixmap Return QPixmap from an array of bytes. More...
 
static QPixmap getImage (QString path, int width=256, int height=256)
 Image::getImage Return a scaled image from the icon specified by it path. The image returned has a resolution of width*height (default 256*256) More...
 

Detailed Description

The Image class Contains generic methods on image formats.

Author

Member Function Documentation

QPixmap Gui::Utils::Image::bytesToPixmap ( const QByteArray  bytes)
static

Image::BytesToPixmap Return QPixmap from an array of bytes.

Parameters
bytesArray of bytes
Returns
QPixmap from bytes
QPixmap Gui::Utils::Image::getImage ( QString  path,
int  width = 256,
int  height = 256 
)
static

Image::getImage Return a scaled image from the icon specified by it path. The image returned has a resolution of width*height (default 256*256)

Parameters
pathIcon path
widthIcon width
heightIcon height
Returns
Scaled image
QByteArray Gui::Utils::Image::imageToBytes ( QImage  image,
const QString  ext = "PNG" 
)
static

Image::imageToBytes Return a QByteArray of the QImage image

Parameters
imageAn image
extExtension file of the image (PNG as default value)
Returns
array of bytes from an QImage image
QByteArray Gui::Utils::Image::pixmapToBytes ( const QPixmap  pix,
const QString  ext = "PNG" 
)
static

Image::pixmapToBytes Return a QByteArray of the QPixmap image

Parameters
pixAn image
extExtension file of the image (PNG as default value)
Returns
array of bytes from an QPixmap image
QImage Gui::Utils::Image::pixmapToImage ( const QPixmap  pix)
static

Image::pixmapToImage Return a QImage of QPixmap image

Parameters
pixAn image
Returns
QImage of pix

The documentation for this class was generated from the following files: