Hi, i'm new to python. I'm trying to input a stack of (prefix.tif) images, modify them to png files and output the new files as prefix.png. One code that i was told to use allows me to modify the input name by adding something to the beginning of the name. This code is:
#!/usr/bin/env python import glob,os stacks=glob.glob('*.tif') for stack in stacks: command="proc2d %s %s " %(stack,'mrc'+stack) os.system(command) print "image low passed"
**In this example, the proc2d command manipulates stack in stacks and "mrc" is added to stack.**
But what i'd like is to be able to change the suffix from .tif to .png. Any advice you give is greatly aprecaited!!