On Thu, 17 Jun 2010, theo wrote:

Hello,

Is there a technical reason why in packages/fcl-image/src/fpreadjpeg.pas the scale option is commented / not implemented?

I've changed that unit for my purpose (see attachment. I hope the patch is valid, I don't have a svn fpc, so it's hand edited).

I have to create thumbnail images and found, that pre-scaling via fpreadjpeg.pas makes loading the images a lot faster.
Of course resampling to the final size is faster too.

The idea of the attached code is, to set MinWidth/MinHeight to the size of the desired thumbnail. The image is pre-shrunk this way (still always bigger than thumbnail) and can be resampled afterwards via stretch draw.

Any problems to expect?

I don't expect any; But I would appreciate it if you could make a bug report
and attache the patch to it. You can assign it to me, this way i won't
forget to apply the patch.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to