I\'m creating a web service for an iPhone app to interact with.
When my client uploads images server-side, I want my php script to resize the image, whilst m
Any one coming to this page from Google looking for ASPECT FILL not ASPECT FIT, it is simply a matter of switching the ratio selection code i.e:
Jim's answer:
resizeRatio = Min(wRatio, hRatio); //Aspect Fit
becomes
resizeRatio = Max(wRatio, hRatio); //Aspect Fill
DevProd's answer:
float ratio = ratioW < ratioH?ratioW:ratioH; //Aspect Fit
becomes
float ratio = ratioW > ratioH?ratioW:ratioH; //Aspect Fill