[Lazarus] EXIF - como ler (how to read)?

Guionardo Furlan guionardo at gmail.com
Tue Jan 19 21:22:40 CET 2010


Hi, I've installed the PascalMagick + ImageMagick.

With the console tool "identify" I get the EXIF properties.
But, using PascalMagick, the only method that appears to do this is the
MagickGetImageAttribute(), that returns only the timestamp of the file (not
the timestamp of picture taken by the camera).
Maybe I'm doing something wrong...

There is the code I'm testing:

program mywanddemo;

{$apptype console}

{$mode objfpc}{$H+}

uses SysUtils, magick_wand, ImageMagick;

procedure ThrowWandException(wand: PMagickWand);
var
 description: PChar;
 severity: ExceptionType;
begin
 description := MagickGetException(wand, @severity);
 WriteLn(Format('An error ocurred. Description: %s', [description]));
 description := MagickRelinquishMemory(description);
 Abort;
end;

var
 status: MagickBooleanType;
 wand: PMagickWand;
 s: string;
begin
  MagickWandGenesis;

 wand := NewMagickWand;

 try
   status:=MagickReadImage(wand,'teste.jpg');
   if (status = MagickFalse) then ThrowWandException(wand);

   s:=String(MagickGetImageAttribute(wand));
   writeln(s);
 readln;

 finally
   wand := DestroyMagickWand(wand);
   MagickWandTerminus;
 end;
end.

2010/1/18 Michael Joyner ᏩᏯ <mjoyner at vbservices.net>:
> Guionardo Furlan wrote:
>
> Buenas pessoal,
>
> encontrei essa biblioteca open-source
> http://delphihaven.wordpress.com/ccr-exif/ e estou tentando portá-la
> para laz-fpc.
> Está complicado, porque o lazarus não tem algumas units como xmldom,
> por exemplo, além de não compilar algumas declarações como "class
> helper".
>
> Então, alguém tem uma sugestão de classe que leia as informações de EXIF?
>
> Aquele abraço.
>
> -------------------
>
> Hi all,
>
> I found this open source library
> http://delphihaven.wordpress.com/ccr-exif/ and I'm trying to porting
> it to Laz-fpc.
> It's complicated, because Lazarus don't have some units as xmldom, for
> example, and don't compile some statements as "helper class".
>
> So someone has a hint of class to read the EXIF information?
>
> That hug.
>
> (Google Translate)
>
>
>
> Have you tried looking into ImageMagick ?
>
> http://wiki.lazarus.freepascal.org/PascalMagick
>
> --
> LyX: http://www.lyx.org/ OpenOffice: http://www.openoffice.org/
> Inkscape: http://www.inkscape.org/ Scribus: http://www.scribus.net/
> GIMP: http://www.gimp.org/ PDF: http://www.pdfforge.org/
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>



-- 
Timeo hominem unius libri
Cogito ergo sum - Carpe diem

[]s
Guionardo Furlan
http://guionardo.blogspot.com
http://www.guionardofurlan.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100119/8f24dc84/attachment-0004.html>


More information about the Lazarus mailing list