[fpc-pascal] Why is FPImage dog slow in reading jpeg's?

Jonas Maebe jonas.maebe at elis.ugent.be
Mon May 30 22:01:26 CEST 2011

On 30 May 2011, at 16:59, michael.vancanneyt at wisa.be wrote:

> It depends on the colors used. The default palette algorithm simply allocates a slot per found color in the jpg and returns the index of the
> slow. For a picture, this will create a huge palette, in which the search for a color is in essence linear, so n^2 lookups.

Isn't it possible to automatically disable the palette automatically for images with a bit depth of 16 bits or more? I'm not aware of any image format that uses palettes at those bit depths (and even if there are such formats, they are at least not common in general use cases).


More information about the fpc-pascal mailing list