(infile, outfile)
| 51 | outdir = os.path.dirname(outfile) |
| 52 | |
| 53 | def save(infile, outfile): |
| 54 | # should maybe treat transparency apart for some image format ? |
| 55 | if infile != outfile: |
| 56 | try: |
| 57 | Image.open(infile).save(outfile) |
| 58 | return True |
| 59 | except IOError: |
| 60 | print "Cannot convert", infile |
| 61 | return False |
| 62 | |
| 63 | def selector(): |
| 64 | path, file = os.path.split(openfile) |