AlbumShaper
1.0a3
|
#include <qcolor.h>
Go to the source code of this file.
Enumerations | |
enum | TRANSFORM_CODE { ROTATE_90, ROTATE_270, FLIP_H, FLIP_V } |
Functions | |
bool | isJpeg (const char *filename) |
Checks to see if an image is a valid jpg by seeing if the image dimensions can be read. More... | |
void | calcScaledImageDimensions (int origWidth, int origHeight, int idealWidth, int idealHeight, int &width, int &height) |
Computes scale of image dimensions while respecting aspect ratio, equivalent to a QImage::scaleMin without actually scaling any image. More... | |
void | constructImages (QString imageName, QImage &slideshowImage, QImage &thumbnailImage) |
Constructs slideshow and thumbnail images for a full sized image. More... | |
bool | transformImage (QString fileIn, QString fileOut, TRANSFORM_CODE transformation) |
Apply image transformation on image. More... | |
bool | scaleImage (QString fileIn, QString fileOut, int newWidth, int newHeight) |
Scale image and save copy to disk. More... | |
bool | scaleImage (QString fileIn, QImage &scaledImage, int targetWidth, int targetHeight) |
Loaded scaled version of image. More... | |
bool | getImageSize (const char *filename, QSize &size) |
Get image dimensions. More... | |
bool | getImageSize (const char *filename, int &width, int &height) |
Get image dimensions. More... | |
double | RGBtoL (QRgb *rgb) |
find luminance of a rgb color triplet More... | |
void | RGBtoHSV (double r, double g, double b, double *h, double *s, double *v) |
Convert a RGB color triplet to HSV. More... | |
void | HSVtoRGB (double *r, double *g, double *b, double h, double s, double v) |
Convert a HSV color triplet to RGB. More... | |
enum TRANSFORM_CODE |
Enumerator | |
---|---|
ROTATE_90 | |
ROTATE_270 | |
FLIP_H | |
FLIP_V |
Definition at line 24 of file imageTools.h.
void calcScaledImageDimensions | ( | int | origWidth, |
int | origHeight, | ||
int | idealWidth, | ||
int | idealHeight, | ||
int & | width, | ||
int & | height | ||
) |
Computes scale of image dimensions while respecting aspect ratio, equivalent to a QImage::scaleMin without actually scaling any image.
Definition at line 39 of file imageTools.cpp.
Referenced by AlbumStatistics::AlbumStatistics(), constructImages(), SubalbumPreviewWidget::createSubalbumPixmap(), PhotoDescEdit::PhotoDescEdit(), EditingInterface::rotateSelection(), EditingInterface::selectAspectRatio(), Subalbum::setRepresentativeImage(), and Album::setRepresentativeImages().
void constructImages | ( | QString | imageName, |
QImage & | slideshowImage, | ||
QImage & | thumbnailImage | ||
) |
Constructs slideshow and thumbnail images for a full sized image.
Definition at line 69 of file imageTools.cpp.
References calcScaledImageDimensions(), getImageSize(), scaleImage(), SLIDESHOW_HEIGHT, SLIDESHOW_WIDTH, THUMBNAIL_HEIGHT, and THUMBNAIL_WIDTH.
Referenced by Photo::constructSmallerImages().
bool getImageSize | ( | const char * | filename, |
QSize & | size | ||
) |
Get image dimensions.
Definition at line 192 of file imageTools.cpp.
References getImageSize().
Referenced by MosaicOptionsDialog::appendImagesInPath(), EditingInterface::applyImageUpdate(), constructImages(), constructImageTiles(), getImageSize(), GrainEditor::GrainEditor(), HistogramInterface::HistogramInterface(), PhotoDescEdit::PhotoDescEdit(), EditingInterface::revertCurrentPhoto(), EditingInterface::rotateFlip(), GeneratePreviewThread::run(), ScaledPreviewInterface::ScaledPreviewInterface(), SelectionPlacementInterface::SelectionPlacementInterface(), SelectionInterface::setPhoto(), EditingInterface::setPhoto(), Subalbum::setRepresentativeImage(), Album::setRepresentativeImages(), setWallpaper(), and EditingInterface::showNextPrevFirstLastPhoto().
bool getImageSize | ( | const char * | filename, |
int & | width, | ||
int & | height | ||
) |
Get image dimensions.
Definition at line 201 of file imageTools.cpp.
References getJPEGSize(), height, and width.
void HSVtoRGB | ( | double * | r, |
double * | g, | ||
double * | b, | ||
double | h, | ||
double | s, | ||
double | v | ||
) |
Convert a HSV color triplet to RGB.
Definition at line 264 of file imageTools.cpp.
References q.
Referenced by HistogramEditor::adjustImage(), SelectionInterface::constructDisplayImages(), embossEffect(), enhanceImageContrast(), SelectionPlacementInterface::SelectionPlacementInterface(), and sharpenImage().
bool isJpeg | ( | const char * | filename | ) |
Checks to see if an image is a valid jpg by seeing if the image dimensions can be read.
Definition at line 33 of file imageTools.cpp.
References getJPEGSize().
Referenced by Photo::setImage(), and transformImage().
void RGBtoHSV | ( | double | r, |
double | g, | ||
double | b, | ||
double * | h, | ||
double * | s, | ||
double * | v | ||
) |
Convert a RGB color triplet to HSV.
Definition at line 231 of file imageTools.cpp.
References b.
Referenced by HistogramEditor::adjustImage(), SelectionInterface::constructDisplayImages(), embossEffect(), enhanceImageContrast(), RGBtoL(), SelectionPlacementInterface::SelectionPlacementInterface(), and sharpenImage().
double RGBtoL | ( | QRgb * | rgb | ) |
find luminance of a rgb color triplet
Definition at line 217 of file imageTools.cpp.
References b, and RGBtoHSV().
Referenced by enhanceImageContrast().
bool scaleImage | ( | QString | fileIn, |
QString | fileOut, | ||
int | newWidth, | ||
int | newHeight | ||
) |
Scale image and save copy to disk.
Definition at line 157 of file imageTools.cpp.
References scaleImage().
Referenced by EditingInterface::applyImageUpdate(), RecentAlbumMenuItem::changeItem(), constructImages(), constructImageTiles(), GrainEditor::GrainEditor(), HistogramInterface::HistogramInterface(), SlideshowWidget::loadPhoto(), TitleWidget::refreshOpenRecentMenu(), EditingInterface::revertCurrentPhoto(), EditingInterface::rotateFlip(), GeneratePreviewThread::run(), ScaledPreviewInterface::ScaledPreviewInterface(), scaleImage(), SelectionPlacementInterface::SelectionPlacementInterface(), SelectionInterface::setPhoto(), EditingInterface::setPhoto(), Subalbum::setRepresentativeImage(), Album::setRepresentativeImages(), setWallpaper(), and EditingInterface::showNextPrevFirstLastPhoto().
bool scaleImage | ( | QString | fileIn, |
QImage & | scaledImage, | ||
int | targetWidth, | ||
int | targetHeight | ||
) |
Loaded scaled version of image.
Definition at line 171 of file imageTools.cpp.
References scaleJPEG().
bool transformImage | ( | QString | fileIn, |
QString | fileOut, | ||
TRANSFORM_CODE | transformation | ||
) |
Apply image transformation on image.
Definition at line 112 of file imageTools.cpp.
References FLIP_H, isJpeg(), ROTATE_270, ROTATE_90, and transformJPEG().
Referenced by Photo::applyTransformation(), and EditingInterface::rotateFlip().