AlbumShaper 1.0a3
invert.cpp
Go to the documentation of this file.
1//==============================================
2// copyright : (C) 2003-2005 by Will Stokes
3//==============================================
4// This program is free software; you can redistribute it
5// and/or modify it under the terms of the GNU General
6// Public License as published by the Free Software
7// Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//==============================================
10
11//Systemwide includes
12#include <qimage.h>
13#include <qstring.h>
14#include <math.h>
15
16//Projectwide includes
17#include "invert.h"
18#include "manipulationOptions.h"
20
21//----------------------------------------------
22// Inputs:
23// -------
24// QString filename - location of original image on disk
25// StatusWidget* status - widget for making progress visible to user
26//
27// Outputs:
28// --------
29// QImage* returned - constructed image
30//
31// Description:
32// ------------
33// This method constructs an inverted version of
34// the image using Qt's invertPixels method. If we were
35// to do this on our own special care to correctly handle the color
36// depth would be necessary.
37//----------------------------------------------
38
39//==============================================
40QImage* invertEffect( QString filename, ManipulationOptions* )
41{
42 //load image
43 QImage* editedImage = new QImage( filename );
44
45 //invert pixel colors, but not alpha components
46 editedImage->invertPixels( false );
47
48 //return pointer to edited image
49 return editedImage;
50}
51//==============================================
QImage * invertEffect(QString filename, ManipulationOptions *)
Definition invert.cpp:40
QImage * editedImage