I do not see where that you are placing IMG_WIDTH, could it be this is left at an enormous worth. You need to prefer to pas teh focus on width amd peak as parameters, teh way you established teh height stops multi-threaded usage and makes it quite difficult to browse.When you are a pasta lover, like a great number of People are, it's not necessary