There are some amazingly bad APIs in Java, so Paul Buchheit says. The best API is system(), or backticks.
The end result is basically an ImageMagick conversion (kudos to a useful incantation for the less than sign):
mogrify -geometry "220x133>" -antialias -quality 90 /tmp/c.jpg /tmp/c-thumb.jpg
You wouldn't write an encyclopedia in limericks (though it's been done before), so there's no need to use a general purpose programming language to manipulate images. Small Pieces Loosely Joined is pretty popular for Unix, CGI/REST, Erlang, Messenger RNA, etc.