Image Editor
Assignment 7 - October 15, 2006
Due: 8:00AM Sunday, October 22, 2006. In the SVN repository
Language: Any programming language of your choice
Objective:
- Create an simple image picture editor with a GUI
You will implement a picture editor that is capable, but not limited, to the following features:
- Loading, displaying and saving images in JPEG and PNG formats.
- Zoom the display in and out.
- Resize the image (actually changing the number of pixels).
- Rotate the image by an arbitrary amount.
- Reflect the image horizontally and vertically.
- Perform simple image corrections on the picture: blur, sharpen, colorize, invert, etc.
While you are free to use any language or framework that you choose, we suggest taking a look at Java and the facilities that it provides. Here are some links:
- Eclipse
An excellent but memory demanding IDE for Java. Learn to use it well and it will save you tons of time.
- Learning Swing by Example
Swing is the Java framework for creating GUIs.
- Using Swing Components
Here is a visual guide to the various Swing components that you will find useful.
- Java 2D Graphics
The 2D graphics framework is actually what you use to do most of the image manipulations.
Students in the past have also had success with using ImageMagick to perform image manipulation. There are bindings for interfacing ImageMagick with most programming languages. ImageMagick lets your perform the image manipulations, but you still need a toolkit for the GUI itself.
If you have any questions about Java Swing, Eclipse or Java 2D, post your questions on the newsgroup. Try to pick a language that is suitable to the project. Unless you've done this kind of programming before, it is likely that using C/C++ will be much harder than using something like Java or C#. Also, if anything is ambiguous, ask questions early!
When working with GUIs, it's important to keep a clean separation between the model, the view, and often the controller. Keeping these separated is called the model-view-controller pattern. Related links: switching UI and a song.
For this application, it is easy to predict some of the changes it will go through in its lifetime. For example, it is likely you would want to extend your program to open new kinds of files or perform new kinds of operations on images. Therefore, try to design your program so these kinds of changes are easy to make.
Finally, don't forget to read other students' code on Sunday, as per your section's rules.
Grading:
- Technical [25]:
- Does the program load at least PNG and JPEG files? [10]
- Can you zoom in and out? [2]
- Can you resize the image? [2]
- Can you rotate the image? [2]
- Can you reflect the image? [2]
- Can you perform filters on the image? [2]
- If your program fails for certain files, did you document those cases? [2]
- Does your program feel like a real application? [3]
- Style [21]:
- Were comments adequate? [3]
- Did you use multiple files for your source code? [3]
- Are most functions less than 25 lines? [5]
- Is there a clean separation at least between the model and the view? [5]
- Is the code modular with respect to the kinds of images it opens and the operations on an image? That is to say, is it easy to add new file types or image operations? [5]
- Participation [20]:
- Did you ask questions in discussion section? [10]
- Are you able to explain how the program works without confusing the other students? [10]