FIT/FILL given dimensions in PHP