[fpc-pascal] FPImage and GetDataLineStart
Marco van de Voort
marcov at stack.nl
Thu Apr 21 21:32:17 CEST 2011
In our previous episode, Michael Van Canneyt said:
>
> There is no generic way to solve this problem, because you'd need a matrix
> covering all possible storage memory formats and all possible disk storage
> formats.
Probably. The point is more that mostly only the diagonal of that matrix
(dumping the existing memory format to disk) is worth accelerating.
IOW the whole point is to make exceptions for a few often used cases.
> The best we can do is create a memory class with some pre-defined memory storages,
> with appropriate getscanline/setscanline routines and make sure the reader classes
> can
> a) detect them
> b) make use of them if they find one matching the file storage format.
> c) fall back on the current mechanism if no fitting format is found.
> If well-chosen, this approach should cover most cases.
Something like that yes. Still duplication for the various formats though.
More information about the fpc-pascal
mailing list