#
# Checking the image properties
#
import os
import subprocess

#
# location of Petronode install folder
#
cBatchProcessorFolder = "C:\\Program Files\\Petronode"

#
# gets image properties
#
def Get_Image_Property ( workfolder, input, property="Y"):
	Params = [os.path.join( cBatchProcessorFolder, "Petronode.CheckImage.exe")]
	Params += [ os.path.join( workfolder, input)]
	Params += [ "/" + property.upper()]
	return subprocess.call( Params)

label = "The file is "
label += str( Get_Image_Property( ".", "Test.png", "X")) + "x"
label += str( Get_Image_Property( ".", "Test.png", "Y")) + " pixels, " 
label += str( Get_Image_Property( ".", "Test.png", "S")) + " bytes."

print (label)
