1. A computer-implemented method comprising execution, by a processor, of operations including: obtaining, from a memory, a digital image containing a pixel block, wherein an AM halftone is configured to be applied to the digital image by default; deriving, from the pixel block, a bitmap defining foreground and non-foreground pixels of the pixel block, wherein deriving the bitmap involves: (i) determining a range of pixel values for a particular pixel of the pixel block and neighboring pixels within a radius of the particular pixel, (ii) determining that a value of the particular pixel falls within a threshold distance of an end of the range that represent pixels with higher intensity than a remaining portion of the range, and (iii) marking, in the bitmap, the particular pixel as a foreground pixel; sequentially reading horizontal lines of the bitmap to identify clusters of foreground pixels, wherein each pixel in a particular cluster of the clusters of foreground pixels is either (i) the only pixel in the particular cluster, or (ii) vertically or horizontally adjacent to another pixel in the particular cluster; based on the clusters of foreground pixels identified in the bitmap, applying an FM halftone to the digital image instead of the AM halftone; and causing the digital image to be printed with the applied FM halftone.