Sign in Join

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

Mailing lists / lazarus / 2013-10

Loading photos on a form

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Chris Kelling

Hello, list - I am writing a membership roster manager and want to include the member's photo and a copy of their license. Using graphics, photos in particular, is new territory for me. I've looked at a couple of resources for both Delphi and Lazarus, but am confused on what control to use (timage, tbitmap, something else)and what are the steps to get the image to that control? From what I've gathered so far, it's something like this:

Load from a file using a tpicture object

Use that information and assign it to an timage object's canvas

Free the tpicture object

I'm looking to use jpeg and png types at a minimum.

Thanks,

Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131007/1235dfb1/attachment.html>

Reply by email

leledumbo
to Chris Kelling
confused on what control to use (timage, tbitmap, something else)and what

are the steps to get the image to that control?

TImage is meant for static image, TBitmap could be one of the possible image container of TImage, or used freely to draw or manipulate other bitmaps. Just drop a TImage and set its Picture property. To load an image from code, use TImage.Picture.LoadFromFile(). png and jpg should be supported out of the box.

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Loading-photos-on-a-form-tp4033737p4033739.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email