On Thu, 2008-04-10 at 18:04 +0200, Torsten Neuer wrote:
> Regarding the MD5 implementation in limbgimpmath, it would have been nice if
> could use it, but I cannot as I have to produce an MD5 on the whole drawable,
> which means that I whould have to run gimp_md5_update() on every tile.
Not on every tile. You would use gimp_pixel_rgn_register() and
gimp_pixel_rgn_process() to iterate over the whole drawable and feed all
pixels through the checksum engine.
> Yet, gimp_md5_init(), gimp_md5_update(), and gimp_md5_final() are declared as
> static (why ?), so I will have to use something else.
The GIMP MD5 implementation was added specifically for the purpose of
implementing the thumbnail spec. We didn't add an all-purpose API simply
because there was no need for it.
> For now, I will therefore use the OpenSSL implementation of MD5 (also, why
> isn't limbgimpmath reusing the OpenSSL code for that purpose ? Just a
> curious question...).
Because that would add a dependency on openssl. In such a case it is a
lot simpler to just duplicate the code.
Gimp-developer mailing list