ingenuitas/SimpleCV — pull request #176 by vijaym123 (2012-07-28 20:26:44+00:00)
Title: Save images temporarily with more options

Hi,

```python
from SimpleCV import *
img = Image('lenna')
img.save(tmp=True)
```
The above code is the older version of creating temp image file in temporary folder. img.save(tmp=True) didn't work correctly as it didn't generate any temp file in /tmp/ folder. I have corrected it to work properly. The life time of the temp file created by this function is just same as the lifetime of the program.

```python
from SimpleCV import *
img = Image('lenna')
img.save(tmp=True, path="/home/",fname="edges") # save files as /home/edges******.jpg"...
img.save(tmp=True, path="/home/") # saves sequentially numbered files /home/Image******.jpg
```
After adding new functionality in save. The above code can create temp image files in home folder. The temp file has the life time same as the program and gets automagically deleted once it ends.

img.save(tmp=True) and all the other types of temporary image file creations returns the path along with the file name.

I have tried to generate number as you had denoted in the example in #175. But NamedTemporaryFile doesn't allow you to give specific temp file names. All you can provide is just the prefix and suffix along with the directory !

Any modifications to be made, please notify me. :)