0

Possible Duplicate:
resize image from file

I have a File f and it's a .jpg. I want to resize it to 640x480 right before I upload it to my PHP web service. I want it to maintain correct ratio (no stretching/skewing).

What's the quickest and easiest way to do this?

Community
  • 1
  • 1
Ethan Allen
  • 14,425
  • 24
  • 101
  • 194
  • This sounds very related to http://stackoverflow.com/questions/2744909/java-detecting-image-format-resize-scale-and-save-as-jpeg – Krease Nov 20 '12 at 23:44
  • @Chris Android doesn't include AWT. – kabuko Nov 20 '12 at 23:47
  • @kabuko - thanks - I was sure this was something I'd seen before and didn't know about the AWT thing. – Krease Nov 20 '12 at 23:51
  • It isn't possible to maintain the aspect ratio of all images while re-sizing them to a discrete WxH value like 640x480. You would have to have to do some cropping. – SemperFly Nov 20 '12 at 23:52
  • @SemperFLy If you want to maintain aspect then you cannot enforce HxW w/o cropping or stretching unless your image already had required aspect ratio – Marcin Orlowski Nov 20 '12 at 23:56

0 Answers0