Subversion Repositories SmartDukaan

Rev

Rev 18920 | Rev 19445 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18920 Rev 18921
Line 13... Line 13...
13
        infile = dir + "/" + sys.argv[1]
13
        infile = dir + "/" + sys.argv[1]
14
        if not os.path.isfile(infile):
14
        if not os.path.isfile(infile):
15
            shutil.copy2(default_image, infile)
15
            shutil.copy2(default_image, infile)
16
        outfile = dir + "/" + sys.argv[2]
16
        outfile = dir + "/" + sys.argv[2]
17
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
17
        if not (os.path.isfile(outfile) and os.path.getmtime(outfile) > os.path.getmtime(infile)):
18
            print infile
18
            sys.stderr.write(infile)
19
            width = int(sys.argv[3])
19
            width = int(sys.argv[3])
20
            height = int(sys.argv[4])
20
            height = int(sys.argv[4])
21
            size = width, height
21
            size = width, height
22
            im = Image.open(infile)
22
            im = Image.open(infile)
23
            im.thumbnail(size, Image.ANTIALIAS)
23
            im.thumbnail(size, Image.ANTIALIAS)