Is there a smart algorithm that converts a bitmap into a sequence of possibly overlapping rectangles? You can trivially make one rectangle 1 pixel high for each run in the image, but I wonder if there is something smarter. #imageprocessing #2dgraphics