Re: [fpc-pascal] questions on fpimage

2017-01-05 Thread Marc Santhoff
On Do, 2017-01-05 at 11:15 +0100, Mattias Gaertner wrote:
> On Tue, 03 Jan 2017 02:54:05 +0100
> Marc Santhoff  wrote:
> 
> > Hi,
> > 
> > firstly a happy new year to you all and keep on rocking!
> > 
> > While reading the fpimage unit code I found some pieces I don't
> > understand and could not clear up reading the docs. Here we go:
> > 
> > 
> > TFPCustomImage = class(TPersistent)
> > [...]
> > public
> > [...]
> >   property  Extra [const key:string] : string read GetExtra write 
> > SetExtra;
> >   property  ExtraValue [index:integer] : string read GetExtraValue 
> > write SetExtraValue;
> >   property  ExtraKey [index:integer] : string read GetExtraKey write 
> > SetExtraKey;
> >   procedure RemoveExtra (const key:string);
> >   function  ExtraCount : integer;
> > 
> > 
> > Whats that good for? Ist to tag images inside my own program or does it
> > handle image meta data like EXIF and stuff?
> 
> Yes. Both.

OK, fine. But there is no code doing sth. like reading EXIF tags from
files, I have do do myself?

I was hoping to find some code handling image comments and the like,
still searching for meta data access. ;)

> > And at the end:
> > 
> > 
> > initialization
> >   ImageHandlers := TImageHandlersManager.Create;
> > 
> > 
> > Looking at this class it seems to be sort of a type registry, maybe able
> > to detect type and name or instantiate the reader and writer classes.
> > How ist that to be used and do I need to care for?
> 
> All image formats register themselves there.
> It is used by
> TFPCustomImage.FindHandlerFromExtension
> and
> TFPCustomImage.LoadFromStream
> 
> You can query it yourself or use the above.

Nice and helpful, thanks.

Marc

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] questions on fpimage

2017-01-02 Thread Marc Santhoff
Hi,

firstly a happy new year to you all and keep on rocking!

While reading the fpimage unit code I found some pieces I don't
understand and could not clear up reading the docs. Here we go:


TFPCustomImage = class(TPersistent)
[...]
public
[...]
  property  Extra [const key:string] : string read GetExtra write SetExtra;
  property  ExtraValue [index:integer] : string read GetExtraValue write 
SetExtraValue;
  property  ExtraKey [index:integer] : string read GetExtraKey write 
SetExtraKey;
  procedure RemoveExtra (const key:string);
  function  ExtraCount : integer;


Whats that good for? Ist to tag images inside my own program or does it
handle image meta data like EXIF and stuff?


And at the end:


initialization
  ImageHandlers := TImageHandlersManager.Create;


Looking at this class it seems to be sort of a type registry, maybe able
to detect type and name or instantiate the reader and writer classes.
How ist that to be used and do I need to care for?


TIA,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal