Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   convert: unrecognized option '-set', posted by Devin Bougie on Mon Jan 26 22:01:07 2009 
    icon2.gif   Re: convert: unrecognized option '-set', posted by Stefan Ritt on Tue Jan 27 09:19:22 2009 
Message ID: 66176     Entry time: Tue Jan 27 09:19:22 2009     In reply to: 66173
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Bug fix  OS: Linux  ELOG Version: 2.7.5 
Subject: Re: convert: unrecognized option '-set' 
> Hello,
> 
> We are now running elog-2.7.5 in a Scientific Linux 4 (RHEL4) system, which uses ImageMagick 6.0.7.1.  After uploading an image, the image 
> manipulation buttons don't work and complain:
> convert: unrecognized option '-set'
> 
> We are using an RPM built from source, and it looks like I should be able to just change "-set comment ..." to "-comment" as in:
> ------
> [dab66@lnx100 tmp]% diff elogd.c elogd.c.new 
> 22601c22601
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22607c22607
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22618c22618
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> 22624c22624
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> ------
> 
> Is there any better way for us to fix this, or is anything else needed?

Well, I believe your modification won't work. I just tried it with ImageMagick 6.3.8 and it failed. Try to rotate your picture four times, and 
it should be back to the old position. When I use "-comment" instead "-set comment" on a PNG file, this did not work. From the man page it 
tells me:

Version: ImageMagick 6.3.8 01/25/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file

Image Settings:
  ...
  -comment string      annotate image with comment
  ...

Image Operators:
  ...
  -set property value  set an image property
  ...


So indeed "-comment" and "-set comment" are two different things. I'm afraid you have to upgrade your ImageMagick package in order to make 
this work.
ELOG V3.1.5-fe60aaf