Picture manipulation with Lazarus, like distortion correction lazarus / 39-Graphics ---------------------------------------------------------------------- stephanweber · 2024-01-15 13:40 Hi, I want to read-in a jpg photo and manipulate it. E.g. A) I want that the straight lines of a house become perpendicular to each other, or B) I want to compensate the distortion of a lense (e.g. wide-angle lense often bend straight lines a bit). For A) I would apply a linear distortion, like expanding the upper rows more than the lower ones, and for B) I may need to expand the outer columns a bit.  To support the operation, I would like to see the original photo in a picture box, and the manipulated one in a 2nd box. If the user parameters to be entered are fine (like the amount of correction), I would export the result to a new jpg. How can I access and manipulate the pixels? Bye Stephan ---------------------------------------------------------------------- wp · 2024-01-15 15:23 Take a look at BGRABitmap, unit bgrafilters. Not exactly what you want, but you may get an idea how to implement it.