Resize big images within a bounding box - applying filters on big images was super slow and gobbled up memory
Remove duplicated code