Optimized value of MIN_WIDTH. Replaced (int) round by Math.ceil
Added caching for an rarely changing calculated fields
Added the getCompatibleImage() method
Optimization of the drawing for reduce CPU usage