<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title></title>
</head>
<body>
<p style="margin: 0px;"><span> </span></p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
Tomas Hajny <XHajT03@hajny.biz> hat am 30. Mai 2011 um 16:50 geschrieben:<br/>
<br/>
> On Mon, May 30, 2011 16:16, michael.vancanneyt@wisa.be wrote:<br/>
> ><br/>
> > Try the following code:<br/>
> ><br/>
> > Img:=TFPMemoryImage.Create(0,0);<br/>
> > Img.UsePalette:=False;<br/>
> > Img.loadFromFile(FileList[i]);<br/>
> ><br/>
> > That should work much faster. The reason is probably that the default<br/>
> > image<br/>
> > created by the reader uses a palette, which is of course dog slow when<br/>
> > reading<br/>
> > large images.<br/>
><br/>
> Interesting. What is supposed to be a "large image"? I ask because the<br/>
> original post mentioned 35 kB and 65 kB (and indirectly also dimensions<br/>
> around 600x400 if I understand the program output correctly) which I<br/>
> certainly wouldn't consider as "large" (and the mentioned time necessary<br/>
> for reading it surely not appropriate regardless of using palette or not).<br/>
> I guess that some optimization may be reasonable because such pictures<br/>
> could be loaded and displayed (including conversion from true colour to<br/>
> 256 colours palette) faster even on a 486 machine...
</div><br/>
Is there any size, where a palette image is fast?<br/>
<br/>
I think this is a newbie trap and the default for UsePalette should be changed.<br/>
<br/>
Mattias<br/>
<br/>
</body>
</html>