examples/input_output/fileOpenSaveDialogExample/README.md
This example demonstrates how to use the file dialog to select and save files from and to directories of your choosing. It also illustrates how to manipulate the pixels of the loaded image.
In the code, pay attention to:
ofSystemLoadDialog to invoke the system level file dialogofFileDialogResult to store the result of the invocationofFileDialogResult.getPath() to retrieve the path to the file selectedfile.getExtension()ofSystemSaveDialog()ofColor color = image.getColor(x, y); sortColorFunctionWhen launching this application you will be able to select an image to load by pressing the spacebar key which will bring up the system level file selection dialog. Once loaded, the pixels of that image are catalogued and then sorted based on color to create a new image. The manipulated image can then be saved to another location using the s key, which will invoke the system level file save dialog.
When the key spacebar is pressed:
When the key s is pressed:
Instructions for use:
spacebar and selecting an image to loads and selecting the destination to write that file, which will be a manipulated version of the original.This Example uses no other classes.