Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-25 Thread Andrew Brunner
Ok, This matter has been solved. The updated code is so simple and many factors faster! Thanks to all! class function Image.Transform(Stream:TMemoryStream; var iX,iY:Integer):boolean; var status : MagickBooleanType; wand : PMagickWand; srcWidth,srcHeight : Ca

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-25 Thread Andrew Brunner
On 02/25/2013 04:51 AM, Graeme Geldenhuys wrote: ImageMagick will probably be a good choice. Regards, - Graeme - Ok, I'm going to start tests with that. Thanks ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/m

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-25 Thread Graeme Geldenhuys
On 2013-02-24 17:35, Andrew Brunner wrote: > > If not, does anyone have lightning fast scaling methods in C++ or Java > that I can port/contribute? A fpGUI user did a speed comparison of a lot of various image libraries and pure Object Pascal imaging code. I can find the link to his work and res

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Andrew Brunner
On 02/24/2013 04:44 AM, Michael Van Canneyt wrote: Try to get rid of the XML, it is always going to be slow. Using XML can slow your applications with a factor 6. If you are mime-encoding an image, it'll be even more. I was just thinking about that. I think JSON would be ok, especially if I

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Michael Van Canneyt
On Sun, 24 Feb 2013, Sven Barth wrote: Maybe a collection of algorithms for in memory rescaling would be nice... There are a lot of them, that is what the interpolations are for, but they work with a canvas. The case of rescaling an image and simply send the resulting image as a file was not

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Sven Barth
On 24.02.2013 12:43, Michael Van Canneyt wrote: On Sun, 24 Feb 2013, Sven Barth wrote: On 24.02.2013 11:44, Michael Van Canneyt wrote: srcImg:=TFPMemoryImage.Create(0,0); Do not use TFPMemoryImage. It is a catch-all memory format, not optimized at all, using 64 bits for the images. In

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Michael Van Canneyt
On Sun, 24 Feb 2013, Sven Barth wrote: On 24.02.2013 11:44, Michael Van Canneyt wrote: srcImg:=TFPMemoryImage.Create(0,0); Do not use TFPMemoryImage. It is a catch-all memory format, not optimized at all, using 64 bits for the images. Instead, use e.g. TFPCompactImgRGBA8Bit if you need

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Sven Barth
On 24.02.2013 11:44, Michael Van Canneyt wrote: srcImg:=TFPMemoryImage.Create(0,0); Do not use TFPMemoryImage. It is a catch-all memory format, not optimized at all, using 64 bits for the images. Instead, use e.g. TFPCompactImgRGBA8Bit if you need alpha or TFPCompactImgRGB8Bit if you do no

Re: [fpc-pascal] Performance problems with Image Conversions

2013-02-24 Thread Michael Van Canneyt
On Sat, 23 Feb 2013, Andrew Brunner wrote: Hi guys, I just finished (a beta) of a collage app for Aurawin. I'm seeing a huge load on my servers when scaling images using the Image factory classes for JPEG, and PNG. Prefix: 6 Core AMD 64 32GB RAM Ubuntu 12.10 x64 8 Core AMD 64 32GB RAM Ub

[fpc-pascal] Performance problems with Image Conversions

2013-02-23 Thread Andrew Brunner
Hi guys, I just finished (a beta) of a collage app for Aurawin. I'm seeing a huge load on my servers when scaling images using the Image factory classes for JPEG, and PNG. Prefix: 6 Core AMD 64 32GB RAM Ubuntu 12.10 x64 8 Core AMD 64 32GB RAM Ubuntu 12.10 x64 FPC/Lazarus daily svn/trunk Ove