I want to display an image with drawn lines on a map, and separate images made for every single section in the image (several connected lines). I have written this code:
Return type of the method is BufferedImage
But you try to return array of BufferedImage. That is thy the error occurs.
BTW: do you really have 2 return statements?