Page 1 of 1

Deprecated but

Posted: 2015-09-09T07:42:11-07:00
by jbd
Hi folks,

I'm trying to install zimg (http://zimg.buaa.us/ ) on a freshly installed debian jessie box.
On compilation time, I got warnings about deprecated functions. As I plan to modify the sources of this soft, I was thinking to update those old call to the right ones. But I have any clue of what to use to change them.

Please find below some revelant informations :

debian jessie 8.2

packages installed :
ii imagemagick-common 8:6.8.9.9-5
ii libmagickcore-6-arch-config:amd64 8:6.8.9.9-5
ii libmagickcore-6-headers 8:6.8.9.9-5
ii libmagickcore-6.q16-2:amd64 8:6.8.9.9-5
ii libmagickcore-6.q16-2-extra:amd64 8:6.8.9.9-5
ii libmagickcore-6.q16-dev:amd64 8:6.8.9.9-5
ii libmagickwand-6-headers 8:6.8.9.9-5
ii libmagickwand-6.q16-2:amd64 8:6.8.9.9-5
ii libmagickwand-6.q16-dev:amd64 8:6.8.9.9-5
Only warnings :
/root/git/zimg/src/zdb.c:132:5: warning: ‘MagickWriteImageBlob’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:166) [-Wdeprecated-declarations]
/root/git/zimg/src/zhttpd.c:339:5: warning: ‘MagickGetImageSize’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:144) [-Wdeprecated-declarations]
/root/git/zimg/src/zimg.c:307:21: warning: ‘MagickGetImageSize’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:144) [-Wdeprecated-declarations]
/root/git/zimg/src/zimg.c:312:25: warning: ‘MagickWriteImageBlob’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:166) [-Wdeprecated-declarations]
/root/git/zimg/src/zimg.c:335:17: warning: ‘MagickGetImageSize’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:144) [-Wdeprecated-declarations]
/root/git/zimg/src/zimg.c:340:21: warning: ‘MagickWriteImageBlob’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:166) [-Wdeprecated-declarations]
/root/git/zimg/src/zimg.c:358:9: warning: ‘MagickWriteImageBlob’ is deprecated (declared at /usr/include/ImageMagick-6/wand/deprecate.h:166) [-Wdeprecated-declarations]
So, I have to change 2 calls : MagickGetImageSize and MagickWriteImageBlob. What should I use to do so ?

Any search in the forum points me to a solution.

Re: Deprecated but

Posted: 2015-09-09T07:51:28-07:00
by dlemstra
MagickWriteImageBlob has been renamed to MagickGetImageBlob and MagickGetImageSize should be replaced with: GetBlobSize(wand->images)

Re: Deprecated but

Posted: 2015-09-10T03:20:29-07:00
by jbd
Hi

Thank you very much for the quick answer.

I fixed the replacement by MagickGetImageBlob with a huge success.

I still have problems with GetBlobSize(wand->images) (in my case ( GetBlobSize(im->images) ). Compiler fails with :
error: dereferencing pointer to incomplete type"

Anyway, I'll fix it as a C related problem.

Thank you again.