-1

For a purely educational exercise: does anyone have any ideas or advice on how I would go about building a basic image editor from scratch? The image editor could resize the image, would blur the image, and perhaps change the RGB values of the image. Although I prefer if the solutions revolve around Java, I am open to solutions that involve PHP, C++, Python.

Kheldar
  • 5,361
  • 3
  • 34
  • 63
arkate
  • 501
  • 8
  • 23

1 Answers1

2

You will need:

  1. A UI framework.
  2. An image-manipulation library.

Step 1 will be creating the GUI for your editor. If you are using Java, Swing is your default choice. If you use NetBeans as your IDE, you can make your GUI using a WYSIWYG interface that will output the code for you. Another good option is to use Qt, which comes with it's own WYSIWYG GUI builder.

At this point you should have a GUI that will allow you to load an image from your computer. Step 2 is manipulating and saving that image. ImageMagick is a popular image manipulation library. It can be a pain to install, but it is very powerful. It has built-in functions for resizing, blurring and saving images. It also gives you access to the raw image data so you can play around with the RGB values as you please. ImageMagick has bindings for both Java and Python.

If you decide to go with Python, Qt and ImageMagick will serve you well. There are other UI frameworks for Python, but AFAIK Qt is the only one with a GUI builder, and it also looks the best in my opinion.

Finally, if you are on a mac, you might want to go with Objective-C instead. XCode is a very friendly IDE with a lovely interface builder. OS X comes with built-in image manipulation libraries that are used by Pixen and Pixelmator among others.

Vlad the Impala
  • 15,572
  • 16
  • 81
  • 124
  • 1
    Ahah, you're mistaken! The OP said he wants to start from scratch, so step one is creating his language, step two is creating the operating system, step three is creating the compiler for his language on this operating system, step four is creating the Windowing system... OK, I'm going to bed... good night ;) – Kheldar Aug 31 '11 at 23:03