[pHash-support] example program that trigger a seg-fault with latest version of CImg

Evan Klinger eklinger at phash.org
Wed Jun 2 12:42:12 PDT 2010


Alexander,
It looks like a new libjpeg was released that fixes some JPEG
corruption errors. You may want to try your test with this version and
see if it was something that was fixed.
http://freshmeat.net/projects/libjpeg

Evan

2010/5/26 Evan Klinger <eklinger at phash.org>:
> Alexander,
> I've tracked down the bug to the ph_mh_imagehash() function. I thought
> we had fixed this bug previously but in the meantime you can change
> the line 946 in pHash.cpp
>
> if (img.spectrum() == 3){
>
> to
>
> if (src.spectrum() == 3){
>
> This fix will be included in the next release. Thank you for pointing it out.
>
> Evan
>
> 2010/5/26 Alexander Kjäll - alaTest <alex at alatest.com>:
>> Hi
>>
>> I wrote a small program that triggers the segmentation fault when trying to
>> calculate the ph_mh_imagehash for an grey scale jpeg image.
>>
>> the code is very simple, but you might need to alter the Makefile to get it
>> to build (I'm not very good at this c++ stuff yet). I also included example
>> images.
>>
>> In order to trigger the segfault you need to use version 1.3.4 or later of
>> CImg to build the pHash library. The version in ubuntu 10.04 is 1.3.2.
>>
>> The example program can be downloaded here:
>>
>> http://frikod.se/~capitol/p-color-test.tar.bz2
>>
>> best regards
>> Alexander Kjäll
>>
>> --
>> Developer
>> alex at alatest.com
>> +468343115
>>
>> _______________________________________________
>> pHash-support mailing list
>> pHash-support at lists.phash.org
>> http://lists.phash.org/listinfo.cgi/phash-support-phash.org
>>
>



More information about the pHash-support mailing list