Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-11

picture preview

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

if I want load a bitmap picture for extracting a small preview of it, what component or library would be best?

My goal is to use pascal only without any external lirbraries if possible. Second goal is to keep the program small, ideally avoiding to link lcl controls in.

Bitmap picture may be anything commen, JPEG, PNG, GIF, BMP, etc.

TIA,
Marc

Reply by email

leledumbo
to Marc Santhoff
if I want load a bitmap picture for extracting a small preview of it, what component or library would be best?

fcl-image (http://wiki.freepascal.org/fcl-image) is the basis of LCL image processing components and routines, so you can for sure use that. I use it to resize uploaded pictures in one of my web applications. TFPImageCanvas (TFPCustomCanvas to be precise) implements CopyRect which you can use for cropping. The wiki article (and the package directory) has some examples to start with.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/picture-preview-tp5726793p5726794.html Sent from the Free Pascal - General mailing list .

Reply by email

Andrew Haines
to Marc Santhoff: if I want load a bitmap picture for extracting a small preview of it, what component or…
Marc Santhoff wrote 13 lines
Hi, if I want load a bitmap picture for extracting a small preview of it, what component or library would be best? My goal is to use pascal only without any external lirbraries if possible. Second goal is to keep the program small, ideally avoiding to link lcl controls in. Bitmap picture may be anything commen, JPEG, PNG, GIF, BMP, etc. TIA, Marc

Hi I attached a small program I just wrote that resizes an image and saves it to a file. I didn't test it but it compiles. It uses just the png reader/writer components but there are several units for different image formats.

FPReadPNG, FPWritePNG
FPReadBMP, FPWriteBMP etc.

Regards,

Andrew Haines

Reply by email