I'm new to both Pascal and Lazarus and I need it for a library called php-gui.
I'm trying to add an image class to it and I'm currently doing it by using PHP Imagick and then rendering each pixel to a canvas. This is quite slow for larger images so I decided to jump into the Pascal and loaded the image like:
(objArray[objId] as TImage).Picture.LoadFromFile(jData.FindPath('params[2][0]').AsString);
After compiling and setting up the class to use this I get an image but it has been cut off.
See screenshot:
https://gyazo.com/9b56faf001b5a34c00de1c2dea125d4aI also use something which has already been built in php-gui which is defined in Pascal like:
(objArray[objId] as TImage).Picture.Bitmap.SetSize(jData.FindPath('params[2][0]').AsInteger,jData.FindPath('params[2][1]').AsInteger);
before calling the load file function.
Would anyone know what was causing this and how I can fix it?