forked from westonplatter/phashion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use original pHash source code & extract patch to support alpha chann…
…el PNGs fix PR#20 => westonplatter#23
- Loading branch information
1 parent
6fe4bdc
commit 9141857
Showing
4 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- pHash-0.9.6-orig/src/pHash.cpp 2013-04-13 19:23:12.000000000 +0200 | ||
+++ pHash-0.9.6-mod/src/pHash.cpp 2013-11-25 02:53:36.000000000 +0100 | ||
@@ -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); | ||
} |