summaryrefslogtreecommitdiff
path: root/libopie2/opieui/oimageeffect.cpp
Unidiff
Diffstat (limited to 'libopie2/opieui/oimageeffect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/oimageeffect.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/libopie2/opieui/oimageeffect.cpp b/libopie2/opieui/oimageeffect.cpp
index 01e7c6f..9a58bb9 100644
--- a/libopie2/opieui/oimageeffect.cpp
+++ b/libopie2/opieui/oimageeffect.cpp
@@ -36,3 +36,4 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 36
37#include "oimageeffect.h" 37#include <opie2/oimageeffect.h>
38#include <opie2/odebug.h>
38 39
@@ -65,3 +66,3 @@ QImage OImageEffect::gradient(const QSize &size, const QColor &ca,
65 if (size.width() == 0 || size.height() == 0) { 66 if (size.width() == 0 || size.height() == 0) {
66 qDebug( "WARNING: OImageEffect::gradient: invalid image" ); 67 odebug << "WARNING: OImageEffect::gradient: invalid image" << oendl;
67 return image; 68 return image;
@@ -351,3 +352,3 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
351 if (size.width() == 0 || size.height() == 0) { 352 if (size.width() == 0 || size.height() == 0) {
352 qDebug( "WARNING: OImageEffect::unbalancedGradient : invalid image" ); 353 odebug << "WARNING: OImageEffect::unbalancedGradient : invalid image" << oendl;
353 return image; 354 return image;
@@ -570,3 +571,3 @@ QImage& OImageEffect::intensity(QImage &image, float percent)
570 if (image.width() == 0 || image.height() == 0) { 571 if (image.width() == 0 || image.height() == 0) {
571 qDebug( "WARNING: OImageEffect::intensity : invalid image" ); 572 odebug << "WARNING: OImageEffect::intensity : invalid image" << oendl;
572 return image; 573 return image;
@@ -635,3 +636,3 @@ QImage& OImageEffect::channelIntensity(QImage &image, float percent,
635 if (image.width() == 0 || image.height() == 0) { 636 if (image.width() == 0 || image.height() == 0) {
636 qDebug( "WARNING: OImageEffect::channelIntensity : invalid image" ); 637 odebug << "WARNING: OImageEffect::channelIntensity : invalid image" << oendl;
637 return image; 638 return image;
@@ -725,3 +726,3 @@ QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
725 modImage.width() == 0 || modImage.height() == 0) { 726 modImage.width() == 0 || modImage.height() == 0) {
726 qDebug( "WARNING: OImageEffect::modulate : invalid image" ); 727 odebug << "WARNING: OImageEffect::modulate : invalid image" << oendl;
727 return image; 728 return image;
@@ -854,3 +855,3 @@ QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
854 if (opacity < 0.0 || opacity > 1.0) { 855 if (opacity < 0.0 || opacity > 1.0) {
855 qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] "); 856 odebug << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] " << oendl;
856 return dst; 857 return dst;
@@ -897,3 +898,3 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
897 if (src.width() != dst.width() || src.height() != dst.height()) { 898 if (src.width() != dst.width() || src.height() != dst.height()) {
898 qDebug( "WARNING: OImageEffect::blend : src and destination images are not the same size" ); 899 odebug << "WARNING: OImageEffect::blend : src and destination images are not the same size" << oendl;
899 return dst; 900 return dst;
@@ -902,3 +903,3 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
902 if (opacity < 0.0 || opacity > 1.0) { 903 if (opacity < 0.0 || opacity > 1.0) {
903 qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" ); 904 odebug << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" << oendl;
904 return dst; 905 return dst;
@@ -942,3 +943,3 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
942 if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) { 943 if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
943 qDebug( "WARNING: OImageEffect::blend : invalid image" ); 944 odebug << "WARNING: OImageEffect::blend : invalid image" << oendl;
944 return image; 945 return image;
@@ -1135,3 +1136,3 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
1135 } 1136 }
1136 else qDebug( "OImageEffect::blend effect not implemented" ); 1137 else odebug << "OImageEffect::blend effect not implemented" << oendl;
1137 return image; 1138 return image;
@@ -1165,3 +1166,3 @@ QImage& OImageEffect::blend(QImage &image1, QImage &image2,
1165 blendImage.width() == 0 || blendImage.height() == 0) { 1166 blendImage.width() == 0 || blendImage.height() == 0) {
1166 qDebug( "OImageEffect::blend effect invalid image" ); 1167 odebug << "OImageEffect::blend effect invalid image" << oendl;
1167 return image1; 1168 return image1;
@@ -1263,3 +1264,3 @@ QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
1263 if (image.width() == 0 || image.height() == 0) { 1264 if (image.width() == 0 || image.height() == 0) {
1264 qDebug( "OImageEffect::hash effect invalid image" ); 1265 odebug << "OImageEffect::hash effect invalid image" << oendl;
1265 return image; 1266 return image;
@@ -1771,3 +1772,3 @@ bool OImageEffect::blend(
1771 { 1772 {
1772 qDebug( "OImageEffect::blend : Sizes not correct" ); 1773 odebug << "OImageEffect::blend : Sizes not correct" << oendl;
1773 return false; 1774 return false;
@@ -1988,3 +1989,3 @@ void OImageEffect::normalize(QImage &img)
1988 if(!normalize_map || !histogram){ 1989 if(!normalize_map || !histogram){
1989 qWarning("Unable to allocate normalize histogram and map"); 1990 owarn << "Unable to allocate normalize histogram and map" << oendl;
1990 free(normalize_map); 1991 free(normalize_map);
@@ -2104,3 +2105,3 @@ void OImageEffect::equalize(QImage &img)
2104 if(!histogram || !map || !equalize_map){ 2105 if(!histogram || !map || !equalize_map){
2105 qWarning("Unable to allocate equalize histogram and maps"); 2106 owarn << "Unable to allocate equalize histogram and maps" << oendl;
2106 free(histogram); 2107 free(histogram);
@@ -2189,3 +2190,3 @@ QImage OImageEffect::sample(QImage &src, int w, int h)
2189 if(!x_offset || !y_offset){ 2190 if(!x_offset || !y_offset){
2190 qWarning("Unable to allocate pixels buffer"); 2191 owarn << "Unable to allocate pixels buffer" << oendl;
2191 free(x_offset); 2192 free(x_offset);
@@ -2207,3 +2208,3 @@ QImage OImageEffect::sample(QImage &src, int w, int h)
2207 if(!pixels){ 2208 if(!pixels){
2208 qWarning("Unable to allocate pixels buffer"); 2209 owarn << "Unable to allocate pixels buffer" << oendl;
2209 free(pixels); 2210 free(pixels);
@@ -2235,3 +2236,3 @@ QImage OImageEffect::sample(QImage &src, int w, int h)
2235 if(!pixels){ 2236 if(!pixels){
2236 qWarning("Unable to allocate pixels buffer"); 2237 owarn << "Unable to allocate pixels buffer" << oendl;
2237 free(pixels); 2238 free(pixels);
@@ -3074,3 +3075,3 @@ QImage OImageEffect::oilPaint(QImage &src, int radius)
3074 if(src.depth() < 32){ 3075 if(src.depth() < 32){
3075 qWarning("Oil Paint source image < 32bpp. Convert before using!"); 3076 owarn << "Oil Paint source image < 32bpp. Convert before using!" << oendl;
3076 return(src); 3077 return(src);