Change input parameters to arrays for easier handling and editing.
Handle errors as well.
Fix data extraction.
Shorter names for java variants.
Provide image size as pairs to allow non-standart ratios.