I have this function above witch even maintain_ration set false, cutting with this proportion. In this case the result is an image with 150x113px, because the original image has 400x300.