1. A controller comprising: a hardware port; wherein the controller is configured to: determine whether a pattern is present in a pixel neighborhood based on a direct comparison of the pixel neighborhood with the pattern, the pixel neighborhood being received via the hardware port, comprising pixels neighboring a pixel from an input image, and including less pixels than an entirety of the image, the pattern being less than the pixel neighborhood; and apply a scaling algorithm to at least a portion of the pixel neighborhood in order to obtain a scaled image if the pattern is present in the pixel neighborhood.