Zooming and Panning in a TImage. lazarus / 21-General ---------------------------------------------------------------------- OC DelGuy · 2024-11-03 16:25 Is there a way to Zoom and Pan around in a TImage? I have a picture that is larger than the screen and TImage just shows the top left of the pic. ---------------------------------------------------------------------- cdbc · 2024-11-03 16:33 Hi Have a look at 'BGRABitmap' it's available in OPM. This framework & components will make your life a lot easier, when it comes to graphics in fpc/laz Regards Benny ---------------------------------------------------------------------- OC DelGuy · 2024-11-05 04:11 Quote from: cdbc on November 03, 2024, 05:33:01 pmHi Have a look at 'BGRABitmap' it's available in OPM. This framework & components will make your life a lot easier, when it comes to graphics in fpc/laz Regards Benny I have that.    I used the BGRA Controls: TDTAnalogClock, TBGRAKnob, TDTAnalogGauge in a previous application I wrote.  But I don't see an Image Control.  Am I missing something? Also, Is there something like a textbook available online for BGRA for free?  I don't have much money and the little I have mostly goes to bills.  I tried using the TDTAnalogClock, but all I can get it to do is display the system time.  Is there a way to use it as a timer or stopwatch? ---------------------------------------------------------------------- TRon · 2024-11-05 04:32 Quote from: OC DelGuy on November 05, 2024, 05:11:04 amBut I don't see an Image Control.  Am I missing something? Dunno, but there isn't an image control so perhaps that complicates matters ? Depending on the use-case there is TBGRAGraphicControl and TBGRAVirtualScreen but besides that you can use TBGRABitmap (in code) and draw it to any canvas. QuoteAlso, Is there something like a textbook available online for BGRA for free? Not that I am aware of (but I haven't  looked very hard either). There are tutorials on the wiki for TBGRABitmap and BGRABitmap also has it's own website here. Searching through the forums might perhaps also be use/helpful. BTW: ATImageBox (OPM) seems able to pan and zoom images. ---------------------------------------------------------------------- cdbc · 2024-11-05 06:27 Hi I think you should keep an eye out for the wiki and their website. Another possibility is to ask your questions here in the forum and maybe dedicate it to @circular (He is the owner/author of BGRABitmat), or to @lainz(He oversees the BGRAControls), or search for entries by @gigatron(He's made some really cool stuff with BGRAVirtualScreen amo.) I, for one, know that to zoom, you use the method 'TBGRABitmap.Getpart(aRect: TRect)'... Regards Benny eta: Have a look at the source for 'LazPaint' it's on github, it knows how to do the stuff you ask for... That app is the *Showroom* for BGRA.