[fpc-pascal] FPImage and mult-page TIFF support

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Dec 8 15:01:40 CET 2016


On Thu, 8 Dec 2016 12:12:27 +0000
Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:

> On 2016-12-07 17:47, Mattias Gaertner wrote:
> >> >   t := TFPReaderTiff.Create;  
> > t.OnCreateImage:=@...
> >   
> 
> Thanks that solved it.
> 
> But why can't TFPReaderTiff do that for us, or at least have a default
> implementation (override'able by developers if really needed).

The default implementation is for the normal use - reading only the
biggest image:
http://wiki.freepascal.org/fcl-image#Reading_an_image_file

How should the default look like for lists of images?

A variable with a default image class, and set as default to
TFPMemoryImage?
That would be a 64bit per pixel image, wasting a lot of memory.

Or using CreateFPCompactImg, which creates a more compact image, but
maybe the image will only support grayscale and/or no alpha.

Or add some helper procedures, for some common cases.


Mattias


More information about the fpc-pascal mailing list