--- src/pHash.cpp	2013-04-13 19:23:12.000000000 +0200
+++ src/pHash.cpp	2013-09-06 03:17:28.000000000 +0200
@@ -369,10 +369,9 @@
     if (src.spectrum() == 3){
         img = src.RGBtoYCbCr().channel(0).get_convolve(meanfilter);
     } else if (src.spectrum() == 4){
-	int width = img.width();
-        int height = img.height();
-        int depth = img.depth();
-	img = src.crop(0,0,0,0,width-1,height-1,depth-1,2).RGBtoYCbCr().channel(0).get_convolve(meanfilter);
+        int width = src.width();
+        int height = src.height();
+        img = src.crop(0,0,0,0,width-1,height-1,0,2).RGBtoYCbCr().channel(0).get_convolve(meanfilter);
     } else {
 	img = src.channel(0).get_convolve(meanfilter);
     }
