Hi everybody (turn out that there is an everybody :)),
One nice idea was to apply various image transformations to a list of images.
Here's one thing I tried to do:
In Python, the code would look like this (assuming that PIL is installed):
for im_filename in glob.glob('*.jpg'):
im = Image.open(im_filename)
contrast_enhancer = ImageEnhance.Contrast(im)
contrast_enhancer.enhance(1.3).save('contrast_' + im_filename)
sharpness_enhancer = ImageEnhance.Sharpness(im)
contrast_enhancer.enhance(2).save('sharpness_' + im_filename)
In Pythonect, we would be looking for something like this:
[glob.glob('*.jpg') -> Image.open(_)] -> [ [color_enhance -> save to 'color' + orig_ filename], [contrast_enhance -> save to 'contrast' + orig_filename] ].
However, for the save function, we need the filename, which doesn't carry over through the creation of the enhancer.
Is there some way to access the result of an old calculation in Pythonect (like we use _ for the result of the last calculation, but for an older one)?
And if not - I have a feeling that this is something that we would like in the syntax. Maybe _[-2] for the second last calculaton, etc.