[SOLVED] BGRAVirtualScreen - Set Image Size lazarus / 39-Graphics ---------------------------------------------------------------------- pixelink · 2019-07-13 16:47 Hi, Getting an image on the BGRAVirtualScreen works fine. However, I want to resize the BGRAVirtualScreen's width and height to match the actual image size so i can just place in a scrollbox to have an easy working scrollbar. Zooming would be nice too if you can point me to some good example docs/code. Thanks ---------------------------------------------------------------------- pixelink · 2019-07-13 18:17 Figured it out. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i gif:= TBGRA AnimatedGif.Create(fName);BGRAVirtualScreen1.width:=gif.width;BGRAVirt ualScreen1.height:=gif.height; I was confused by the face that the intellisense didn't display any methods. ---------------------------------------------------------------------- lainz · 2019-07-13 20:50 Zooming an image is like taking a rectangle of the source image and scaling it up, then displaying it on the BGRAVirtualScreen. You can see how it's done in LazPaint, but his source code is very big. Is not so easy, but is not that hard, you can try yourself to code one zooming function. I did one for a level editor, included in BGRAGames, for example, there you have another source code, this one I think is a lot smaller than LazPaint, but his domain is not images but sprite maps.