I've got a *.dll that controls picture file dimensions. It consists of an easy function:
CopyPic (PChar: inFileName, outFileName: PChar, MaxSize: Int, MaxWidth: int, MaxHeight: int)
...and returns an int for error checking.
I have to can get on from PHP code. I'd it tell you Java.