Thursday, 3 April 2014

Import a Java project into Eclipse from git

Problem: You try to import a Java project from Github into Eclipse where the original project was not created in Eclipse. You have the choice to import as a standard project and it is not quite so obvious how you convert that project into a Eclipse Java project.

Solution: For this example I will use https://github.com/haydenmuhl/nes it is a NES emulator written in Java that does not include the Eclipse project configuration.

Step 1: Go to https://github.com/haydenmuhl/nes and get the git URL.

Step 2: Right click on the project explorer in Eclipse and choose import > GIT > Project from GIT.


Step 3: Choose Clone URI.

Step 4: Enter the URL from github (https://github.com/haydenmuhl/nes.git).

Step 5: Choose the master branch and press next and choose import as general project.


Step 6: Click next and finish, you will notice you have a new project in your workspace.

Step 7: Right click the nes project and choose properties, search for the string "facets" and choose Project Facets.

Step 8: Convert to Faceted Form, check Java and press OK.


Step 9: Configure your build path if there are any errors.

You can now Right click, run as java application along with all of the other great features that come with having a Java project in Eclipse.


Wednesday, 12 December 2012

Text tool in GIMP 2.8

A quick word on the text tool in GIMP 2.8. It has been greatly improved over previous versions and is definitely more intuitive and works really how you would expect it to.

Choose the A icon from the Tool Options menu, think of it as a square and click + drag to the size you think you will need, don't worry too much about the size of the text this can be re sized after.

You can also choose dynamic from the Box drop down menu, this will wrap the text box around the text and always keep it to the size needed.

If you would like dynamic by default simply choose the text tool and click on the canvas without dragging.

Start typing some text into the box, click the icon in the Tool Options menu that has Aa then cycle through the different fonts, you will notice the text picks up the changed font immediately and displays it in the preview. It also works with size, color and all of the other options available for text.

When you are finished editing the text simply select a new tool to deselect the text tool.


  • Use editor will open an inline editor, this may come in useful if you are typing a lot of text. I am usually only editing a few words so never use this feature but I can see why it would come in handy.
  • Antialiasing will smooth out the font for you, zoom in and look at an O, notice when antialiasing is enabled the O looks smooth, and when it is disabled the O looks jaggedy!



Sunday, 9 December 2012

GMIC for Gimp

I came across this plugin while browsing through Sourceforge, it is called GMIC. According to the website (http://gmic.sourceforge.net/index.shtml) "G'MIC stands for GREYC's Magic Image Converter. 

This project aims to:
Define a lightweight but powerful script language (G'MIC) dedicated to the design of image processing operators and pipelines."

GMIC for GIMP provides a large set of image filters you can use to spruce up your images. I find these filters work great for photographs, my favorites are Polaroid and Reflection. These two are great if you are putting photographs into a web page but they look a bit boring.

To install on Windows, go to the following page (http://gmic.sourceforge.net/gimp.shtml) and download the windows plugin. This gets placed in the GIMP plugins folder.

For ubuntu its a little easier:

sudo add-apt-repository ppa:ferramroberto/gimp
sudo apt-get update
sudo apt-get install gmic gimp-gmic

When you fire up GIMP you will have a new menu item under Filters called G'MIC.

An example image:



There is a Flickr group with some examples of what can be done.
http://www.flickr.com/groups/gmic/

Thursday, 3 March 2011

How to make GIMP work in one window.

This is a feature I have been looking for in the GIMP for a long time, every other application works in a single window environment.

Having said that I have gotten used to the multi windowed environment of the GIMP.

Anyways I came across this while messing around with an experimental (2.7) version. It wouldn't install on my Windows 7 64bit machine so I installed it within a virtualbox. I got the file from the following location: http://www.gimpusers.com/downloads/8-gimp-2-7-1-windows-32-64-bit

Below is a screenshot of the GIMP in single window mode:


I think it looks good :)

Wednesday, 2 March 2011

Creating patterns in GIMP

Step 1.

Open the GIMP and go to File > New. When the new document dialog opens up insert the values shown below in the image to create a new image 8x8 pixels.



When the image is created it will be very small, use the magnifier to magnify the image right up until it is easy to work with.

Step 2.

Choose the pencil tool from the toolbox and choose the brush Circle(01) as shown in the picture below.

Now that you are ready to draw the pattern I will illustrate two simple pattern types, they are shown below.




For the Zigzag, draw the following with the pencil tool.

And for the stripey pattern draw the following.


Final Step:

Finally to make these images as patterns save them as stripey/zigzag .pat move the .pat file into your gimp patterns folder, on Windows 7 this will be located in C:\Users\<username>\.gimp-<ver>\patterns.

Go back to gimp click on the small arrow in the patterns tab outlined in the image below select refresh patterns.


And thats how you create and add patterns in GIMP.