Abstract:For the problem that thermal printer can’t print gray scale image in the market, this paper proposes a gray-scale processing algorithm based on binary image. By region segmentation, region gray-scale processing and region binary processing of the original RGB bitmap, this algorithm can make the binary image show a certain grayscale effect visually. This algorithm runs on STM32 platform, and is verified by TFTLCD display and tested by actual thermal printer. The result shows that the algorithm is correct and available. |