Exif info different in api and command line?

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
Jacob

Exif info different in api and command line?

Post by Jacob »

In command line i use
identify.exe -format "%[EXIF:DateTime]" 1.jpg
and see 2006:12:20 17:30:40.
in api i use $str = MagickGetImageProfile($mw2, "%[EXIF:DateTime]");
and str empty.
$str = MagickGetImageProfile($mw2, "EXIF");
return no parsed exif block. Is it normal and any way how parse it?

P.S. Maybe have any advice or hint how make contrast picture in percent?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Exif info different in api and command line?

Post by magick »

To return the EXIF date/time tag, use
  • MagickGetImageAttribute($mw2, "EXIF:DateTime");
Jacob

Re: Exif info different in api and command line?

Post by Jacob »

magick wrote: To return the EXIF date/time tag, use
  • MagickGetImageAttribute($mw2, "EXIF:DateTime");

not work.
i use ImageMagick 6.2.4 09/11/05 Q16 1572
and $str = MagickGetImageAttribute($mw2, "EXIF:DateTime"); $str empty.
Jacob

Re: Exif info different in api and command line?

Post by Jacob »

magick wrote: To return the EXIF date/time tag, use
  • MagickGetImageAttribute($mw2, "EXIF:DateTime");


for ImageMagick 6.3.2 02/05/07 Q16 1586 not work also, it return empty string.
Command line call return right datetime. :-(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Exif info different in api and command line?

Post by magick »

Our mistake. Use MagickGetImageAttribute() not MagickGetImageProfile().
Jacob

Re: Exif info different in api and command line?

Post by Jacob »

magick wrote: Our mistake. Use MagickGetImageAttribute() not MagickGetImageProfile().

Nice - it work :-)
Thank you!

I not see this function in MagickWandForPHPManual.chm and
not see it in http://www.magickwand.org/
Help me please, say where is right manual?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Exif info different in api and command line?

Post by magick »

The documentation is for MagickWand 1.0.0. It has the MagickGetImageProperty() method documented. MagickGetImageAttribute() is deprecated.
Post Reply