in the demo \ImageEn\Demos\ImageAnalysis\Palette an AV is triggered when clicking on an empty space on the TImageEnView (but still on the TImageEnView):
Since the X and Y values are still positive, how can this error be avoided?
Sorry, we don't do any sanity checking there to ensure you are over the image. You just need to compare the result from XScr2Bmp/YScr2Bmp to the bitmap size.