
Getting print of an A3, A2, A1 or A0 size of image may not easy. Most printers uses A4 document size as standart.
Here is a simple cropper in python to crop your images into A4 size image files to help you stick them together to create a huge image.
It uses Python language and ImageMagick's 'convert'. So in case of any problem, please try to install ImageMagick and Python and try again.
import os
import sys
if (len(sys.argv) > 2):
size = sys.argv[1]
imageFile = sys.argv[2]
imageOrientation = sys.argv[3]
else:
print("\nbasic usage: a4crop a2 xxx.png v\n")
size = raw_input("\nOrijinal size? (a0, a1, a2, a3)\n")
imageOrientation = raw_input("\nOrientation of the original mage file? (v for vertical, h for horizontal)\n")
imageFile = raw_input("\nName of the original image file?\n")
if (size == "a3"):
if (imageOrientation == "v"):
os.system("convert " + imageFile + " -crop 1123x793+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+793 2-" + imageFile)
print("Files created")
elif (imageOrientation == "h"):
os.system("convert " + imageFile + " -crop 793x1123+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+0 2-" + imageFile)
print("Files created")
else:
print ("Orientation missing.")
print (imageFile)
elif (size == "a2"):
if (imageOrientation == "v"):
os.system("convert " + imageFile + " -crop 793x1123+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+0+1123 3-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+1123 4-" + imageFile)
print("Files created")
elif (imageOrientation == "h"):
os.system("convert " + imageFile + " -crop 1123x793+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+793 3-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+793 4-" + imageFile)
print("Files created")
else:
print ("image orientation missing.")
print (imageFile)
elif (size == "a1"):
if (imageOrientation == "v"):
os.system("convert " + imageFile + " -crop 1123x793+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+793 3-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+793 4-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+1586 5-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+1586 6-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+2379 7-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+2379 8-" + imageFile)
print("Files created")
elif (imageOrientation == "h"):
os.system("convert " + imageFile + " -crop 793x1123+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+0 3-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+0 4-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+0+1123 5-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+1123 6-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+1123 7-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+1123 8-" + imageFile)
print("Files created")
elif (size == "a0"):
if (imageOrientation == "v"):
os.system("convert " + imageFile + " -crop 793x1123+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+0 3-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+0 4-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+0+1123 5-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+1123 6-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+1123 7-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+1123 8-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+0+2246 9-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+2246 10-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+2246 11-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+2246 12-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+0+3369 13-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+793+3369 14-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+1586+3369 15-" + imageFile)
os.system("convert " + imageFile + " -crop 793x1123+2379+3369 16-" + imageFile)
print("Files created")
elif (imageOrientation == "h"):
os.system("convert " + imageFile + " -crop 1123x793+0+0 1-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+0 2-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+793 3-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+793 4-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+1586 5-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+1586 6-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+0+2379 7-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+1123+2379 8-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+3369+0 9-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+2246+0 10-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+2246+793 11-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+3369+793 12-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+2246+1586 13-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+3369+1586 14-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+2246+2379 15-" + imageFile)
os.system("convert " + imageFile + " -crop 1123x793+3369+2379 16-" + imageFile)
print("Files created")
else:
print ("Error: image orientation missing.")
print (imageFile)
else:
print("Error: size missing...\n")