Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

invert.cpp

Go to the documentation of this file.
00001 //============================================== 00002 // copyright : (C) 2003-2005 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 //============================================== 00010 00011 //Systemwide includes 00012 #include <qimage.h> 00013 #include <qstring.h> 00014 #include <math.h> 00015 00016 //Projectwide includes 00017 #include "invert.h" 00018 #include "manipulationOptions.h" 00019 #include "../../gui/statusWidget.h" 00020 00021 //---------------------------------------------- 00022 // Inputs: 00023 // ------- 00024 // QString filename - location of original image on disk 00025 // StatusWidget* status - widget for making progress visible to user 00026 // 00027 // Outputs: 00028 // -------- 00029 // QImage* returned - constructed image 00030 // 00031 // Description: 00032 // ------------ 00033 // This method constructs an inverted version of 00034 // the image using Qt's invertPixels method. If we were 00035 // to do this on our own special care to correctly handle the color 00036 // depth would be necessary. 00037 //---------------------------------------------- 00038 00039 //============================================== 00040 QImage* invertEffect( QString filename, ManipulationOptions* ) 00041 { 00042 //load image 00043 QImage* editedImage = new QImage( filename ); 00044 00045 //invert pixel colors, but not alpha components 00046 editedImage->invertPixels( false ); 00047 00048 //return pointer to edited image 00049 return editedImage; 00050 } 00051 //==============================================

Generated on Sun Mar 4 19:42:56 2007 for AlbumShaper by doxygen 1.3.7