By: W14-2
Since: Feb 2019
Licence: MIT
- 1. Introduction
- 2. Quick Start
- 3. A Walk Through
- 4. Features
- 4.1. Black and White Filter :
bw
- 4.2. Brightness:
brightness
- 4.3. Clear Album:
clear
- 4.4. Contrast:
contrast
- 4.5. Crop an Image :
crop
- 4.6. Exit the Program :
exit
- 4.7. Export edited Image :
export
- 4.8. Help View:
help
- 4.9. Import an Image :
import
- 4.10. List Files:
listfiles
- 4.11. Open an Image :
open
- 4.12. Redo Edit Steps :
redo
- 4.13. Rotate an Image :
rotate
- 4.14. Resize an Image :
resize
- 4.15. Save Image :
save
- 4.16. Save Preset:
savepreset
- 4.17. Set Preset:
setpreset
- 4.18. Tab Switching:
tab
- 4.19. Undo Edit Steps :
undo
- 4.20. WaterMark :
wm
- 4.1. Black and White Filter :
- 5. Upcoming Features (in v2.0)
- 6. Command Summary
1. Introduction
FomoFoto is an image processing software suite written in Java. This application is optimised for users who are familiar with the Command Line Interface (CLI), while providing a Graphical User Interface (GUI) for easy reference. The application is optimized for users who prefer text-based instructions.
For new users, jump to Section 2, “Quick Start” for an overview on how to use FomoFoto and view the tools available.
2. Quick Start
System Requirements:
-
Windows 10 or newer / OS X 10.8 or newer.
-
Java 9 or newer.
Follow the steps below to set up your computer to run FomoFoto:
-
Ensure your system meets the system requirements.
-
Download the latest FomoFoto.jar here.
-
Copy the JAR to the folder you want to use as the home folder for your FomoFoto application.
-
Double-click the JAR to start the application. The Graphical User Interface should appear in a few seconds.
Figure 1. Home Page of FomoFoto -
You have just successfully setup FomoFoto on your device. To see the command available in FomoFoto, refer to Section 4, “Features” for details of each command. A step-by-step walkthrough of FomoFoto is available in the next section: Section 3, “A Walk Through”.
3. A Walk Through
Let’s start on our image editing journey. In this walkthrough, we will be demonstrating some simple commands to edit a sample image.
-
Head over to this link to get a suggested sample image to start from.
-
Save the image in any desired folder you like on your device, like your Pictures folder for example. Name your image squirrel.jpg.
-
Start FomoFoto by referring to Section 2, “Quick Start”.
-
Open the folder that the image file is stored in. Then, to get the file path of the image:
-
In Windows: Hold on to the Shift key and right click on your image file. Click the option Copy path.
-
In Mac: Go to terminal and navigate to your image file. Type 'pwd' to get the file path to your image file and copy paste.
-
-
Go back to the FomoFoto application. Import the image into FomoFoto by typing as follows:
Figure 2. Import Command -
Paste the file path of the image you would like to import.
-
In Windows: Remove the " and " signs at the two ends of the file path.
-
-
Ensure your final command looks similar to the figure below (file path may differ):
Figure 3. Import with Filepath -
Press Enter to execute the import command. Your image should be now displayed on the Album tab on the FomoFoto application as shown in the figure below.
Figure 4. Import Success -
Open the imported image in FomoFoto by typing as follows:
Figure 5. Open Command -
Press Enter to execute the open command. Your image should be now displayed on the FomoFoto application as shown in the figure below.
Figure 6. Open Success -
Increase the brightness of the image by typing the following command:
brightness 2.0
. This doubles the brightness of the image.Figure 7. Brightness Command -
Press Enter. Your image should be brighter as shown in the figure below.
Figure 8. Brightness Success -
Crop your image by typing the following command:
crop 310 250 140 200
. Press Enter. Your image should look similar to the figure below.Figure 9. Crop Success -
Save your edits by typing the command:
save
.
4. Features
This section describes all the commands available in FomoFoto. It provides a short description of what each command does, their formats as well as examples of how to use them. The commands are listed in alphabetical order.
Command Format
The following styles are used to describe the format of the commands.
-
Words in
UPPER_CASE
are to be replaced with what the text specifies.
e.g.open FILENAME
:FILENAME
is to be replaced with the name of the file that the user wants to work on such asopen myImage.png
. -
Words in square brackets are optional values.
e.g.brightness [BRIGHTNESS_RATIO]
:BRIGHTNESS_RATIO
can be omitted. Bothbrightness
andbrightness 0.9
are accepted.
4.1. Black and White Filter : bw
Applies a black and white filter on the opened image based on an integer
threshold value. If the threshold value is not specified, the black and white filter will use a preset threshold value of 127. Pixels in the image lighter than the threshold value will become white and pixels in the image darker than the threshold value will become black. The higher the threshold value, the larger the proportion of black and the smaller the proportion of white.
Format: bw [THRESHOLD_VALUE]
Examples:
-
bw
(threshold value preset to 127) -
bw 130
4.2. Brightness: brightness
Adjusts the brightness of the opened image based on a decimal value. If the brightness value is not specified, a preset decimal value of 1.1 will be used. Any positive decimal value that is less than 1 (e.g. 0.5) will reduce the brightness of the image while any decimal value that is above 1 (e.g. 1.9) will increase the brightness of the image. Negative decimal value will not be accepted.
Format: brightness [BRIGHTNESS_VALUE]
Examples:
-
brightness
(brightness decimal value is preset to 1.1 which increases the brightness slightly) -
brightness 1.9
(increases brightness) -
brightness 0.3
(reduces brightness)
4.3. Clear Album: clear
Clears all images imported into the Album.
Format: clear
Clear does not remove the image currently being edited i.e. Images opened with the |
4.4. Contrast: contrast
Adjusts the contrast of the opened image based on a decimal value. If the contrast value is not specified, a preset decimal value of 1.1 will be used. Any positive decimal value that is lower than 1 (e.g. 0.5) will reduce the contrast of the image while any decimal value that is above 1 (e.g. 1.9) will increase the contrast of the image. Negative decimal value will not be accepted.
Format: contrast [CONTRAST_VALUE]
Examples:
-
contrast
(contrast decimal value is preset to 1.1 which increases the contrast slightly) -
contrast 1.4
(increases contrast) -
contrast 0.3
(reduces contrast)
4.5. Crop an Image : crop
Crops an image based on the given top left-hand corner coordinates, width and height of final cropped image wanted.
Format: crop X_POINTCOORD Y_POINTCOORD WIDTH HEIGHT
The point coordinates must be separated by a space each. |
Example:
-
crop 2 3 500 500
4.6. Exit the Program : exit
Exits the program.
Format: exit
4.7. Export edited Image : export
Exports the edited image into the specified Directory
Format: export f/FILENAME d/DIRECTORY
Example:
-
export f/newImage.jpg d/C:\Users\randy\Desktop
4.8. Help View: help
Displays help view to user.
Format: help
4.9. Import an Image : import
Imports images to FomoFoto’s Album from a specified file path or a folder.
Format: import FILEPATH
Example of single file path import:
-
import C:\Users\Addison\Desktop\sample.jpg
-
import C:\Home\sample.png
Example of folder import:
-
import C:\Users\Addison\Desktop
-
import C:\Home
For folder import, invalid files are skipped and only valid images will be imported.
Images should be of the following formats: bmp , jpg , jpeg , png , tif , tiff or gif . Images with tif or tiff formats are not rendered on screen due to a bug with Java but edits made will still be applied.
|
Additionally, images must also adhere to the following additional requirements:
-
Not be hidden or prepended by a
.
dot identifier. -
Not be over 10MB in size.
-
Not have the same name as an existing image in the Album.
4.10. List Files: listfiles
Lists all the names of the files in the album.
Format: listfiles
4.11. Open an Image : open
Opens an image from the album for editing.
Format: open FILENAME
Example:
-
open sample.jpg
4.12. Redo Edit Steps : redo
Returns to a previously undone state.
Format: redo
Redoable commands: those commands that modify the image ( |
Examples:
-
rotate 180
brightness
undo
(reverses thebrightness
command)
redo
(runsbrightness
again) -
contrast 0.3
crop 2 3 500 500
undo
(reverses thecrop 2 3 500 500
command
undo
(reverses thecontrast 0.3
)
redo
(runscontrast 0.3
command again)
redo
(runscrop 2 3 500 500
command again)
4.13. Rotate an Image : rotate
Rotates the image by a given degree provided by the user. Only 90, 180 or 270 degrees of rotation is allowed.
Format: rotate ANGLE
Example:
-
rotate 90
4.14. Resize an Image : resize
Resizes the image to a given width and height provided by the user.
Format: resize WIDTH HEIGHT
Example:
-
resize 100 200
4.15. Save Image : save
Applies your edits and saves the image.
Format: save [FILENAME]
Example:
-
save
-
save newname.jpg
For a file name to be valid, it must end with either of the following: |
Figure 10, “Invalid Save Name” shows an example of how FomoFoto does not allow saving with invalid names. Ensure that your file name is valid before saving. There should be a message to indicate that the save is successful as shown in Figure 11, “Valid Save Name” . To overwrite the original image, simply use save
without the file name.
4.16. Save Preset: savepreset
Saves a list of commands that were used to edit the opened image under a specified name so that you can apply them on other images in the future. The specified name given must not be used before.
Format: savepreset PRESETNAME
Example:
-
rotate 180
brightness 1.3
savepreset preset1
(savesrotate 180
andbrightness 1.3
in a list of commands that can be used on other images)
4.17. Set Preset: setpreset
Applies the list of commands saved under the specified preset name on the opened image.
Format: setpreset PRESETNAME
Example:
-
rotate 180
brightness 1.3
savepreset preset1
(savesrotate 180
andbrightness 1.3
in a list of commands that can be used on other images)
open newImage.jpg
(opens a new image to edit on)
setpreset preset1
(applies the list of commands which consists ofrotate 180
andbrightness 1.3
on the newly opened image)
4.18. Tab Switching: tab
Cycle between available tabs in the side Information Panel.
Format: tab
The three available tabs are listed below:
-
Album Images
-
Displays all images currently opened in the Album and available for editing.
-
-
EXIF Profile
-
Displays all ancillary tags attached to the currently opened image such as metadata information like Date and Time and Copyright information.
-
-
Command History
-
Display all Image Transformation and Image Filters applied to the currently opened image.
-
4.19. Undo Edit Steps : undo
Goes back to the previous state of the image.
Format: undo
Undoable commands: those commands that modify the image ( |
4.20. WaterMark : wm
Adds a watermark to the image with a © at the start of the input message. Messages can contain spaces. Should the message be too long to fit within the width of the image, the message will be cut off.
Format: wm MESSAGE
Each image can only have one watermark. |
Example:
-
wm FomoFoto
-
wm Done By FomoFoto
5. Upcoming Features (in v2.0)
5.1. Layer
Format: layer add (layer name)
→ Creates a new layer for the user to work on.
Example:
-
layer add BW-layer
adds a new layer with name BW-layer.
Format: layer select (layer name)
→ Selects the layer the user wants to work on.
Example:
-
layer select BW-layer
selects the BW-layer.
Format: layer delete (layer name)
→ deletes the layer with input name.
Example:
-
layer delete (BW-layer)
→ deletes the BW-layer
This command is not undo-able and transformations on each layer do not affect other layers.
5.2. Ruler
Format: ruler [ON|OFF]
→ Toggles a ruler that surrounds the displayed image. This will help you in estimating the number of pixels to move when using crop
or resizing objects.
6. Command Summary
Below is a quick summary of all the commands available in FomoFoto.
-
Black/White
bw [THRESHOLD_VALUE]
e.g.bw 127
-
Brightness
brightness [BRIGHTNESS_VALUE]
e.g.brightness 0.8
-
Clear
clear
-
Contrast
contrast [CONTRAST_VALUE]
e.g.contrast 1.9
-
Crop
crop X_POINTCOORD Y_POINTCOORD W_WIDTH H_HEIGHT
e.g.crop 2 4 500 500
-
Exit
exit
-
Export
export f/FILENAME d/DIRECTORY
e.g.export f/newImage.jpg d/C:\Users\randy\Desktop
-
Help
help
-
Import
import FILEPATH
e.g.import Users/Fomo/Pictures/sample.jpg
-
List Files
listfiles
-
Open
open FILENAME
e.g.open sample.jpg
-
Redo
redo
-
Rotate
rotate ANGLE
e.g.rotate 270
-
Resize
resize WIDTH HEIGHT
e.g.resize 100 200
-
Save
save [FILENAME]
e.g.save MyNewImage.png
-
Save Preset
savepreset PRESETNAME
e.g.savepreset preset1
-
Set Preset
setpreset PRESETNAME
e.g.setpreset preset1
-
Tab
tab
-
Undo
undo
-
WaterMark
wm MESSAGE
e.g.wm FomoFoto