'''PYTHON3 bash = "width=`identify -ping -format '%w' {}` ".format('design_adjusted.png') bash += "height=`identify -ping -format '%h' {}` ".format('design_adjusted.png') bash += "wx=$(($width-1)) hy=$(($height-1)) " bash += "coords='0,0 657,926 ${},0 1254,1067 ${},${} 1133,2051 0,${} 419,1803' ".format('wx','wx','hy','hy') bash += "width=`identify -ping -format '%w' {}` ".format('template_white.png') bash += "height=`identify -ping -format '%h' {}` ".format('template_white.png') bash += "dims='${}x${}' ".format('width','height') bash += 'convert \\ -size $dims xc:none \\ \\( {} -alpha set -virtual-pixel transparent '.format('design_adjusted.png') bash += '+distort Perspective "$coords" \\) \\-geometry +419+926 -compose Over -composite design_positioned.png' os.system(bash) if os.path.isfile("/home/rexweb/Desktop/project/design_positioned.png"): return "<h1>SUCCESS</h1>" return '<h1>ERROR</h1>''''
4 Reset to default