GIF Editor

This tool provides a basic GIF editor as a viewer within the JBuilder IDE. It appears as the "Design" tab in the content pane when viewing a GIF image. A preview panel appears in the structure pane.

Several toolbars let you manipulate the image.

IconPurpose
Rotate anticlockwise Rotate the image 90 degrees in an anticlockwise (counter-clockwise) direction
Rotate clockwise Rotate the image 90 degrees in a clockwise direction
Flip vertically Flip the image along its horizontal axis so that top becomes bottom and vice versa
Flip horizontally Flip the image along its vertical axis so that left becomes right and vice versa
Move up and left Move the image one pixel up and to the left
Move up Move the image one pixel up
Move up and right Move the image one pixel up and to the right
Move left Move the image one pixel to the left
Move right Move the image one pixel to the right
Move down and left Move the image one pixel down and to the left
Move down Move the image one pixel down
Move down and right Move the image one pixel down and to the right
Zoom in Magify the image in the grid to double its previous size
Zoom out Contract the image in the grid to half its previous size
Save image Save any changes to the underlying file
Reset image Discard any changes and revert to the last saved image
Resize image Change the dimensions of the image - details outside the new boundaries are lost
Help Display this file

Draw Draw individual pixels in the current colour - you can drag to colour multiple pixels
Pickup colour Make the colour from the selected pixel the current colour
Fill Replace the colour clicked on, and all connected pixels of the same colour, with the current colour
Erase Clear individual pixels (make transparent) - you can drag to erase multiple pixels
Move Drag the entire image to a new position - details outside the image boundaries are lost
Line Drag to draw a line in the current colour
Oval Drag to draw an oval in the current colour
Rectangle Drag to draw a rectangle in the current colour
Rounded rectangle Drag to draw a rounded rectangle in the current colour
Filled oval Drag to draw a filled oval in the current colour
Filled rectangle Drag to draw a filled rectangle in the current colour
Filled rounded rectangle Drag to draw a filled rounded rectangle in the current colour

Colours Select the colour to use for drawing. The last two buttons pop up a colour chooser when selected so that you can pick colours other than the basic ones. You can also use the Dropper tool to select an existing colour from the image.

You can create a new GIF image by going to File | Open File and entering a new filename with a ".gif" extension. Then open up this viewer and create your new image, resizing as necessary.

To install the editor, just copy the *.jar file to the JBuilder/lib/ext directory, the *Doc.jar file to the JBuilder/doc directory, and restart JBuilder.

Portions of this code come from the JIconEditor component described by Claude Duguay in his February 2000 JavaPro article.

Writing out the GIF image uses the GIF encoder from Acme Java (http://www.acme.com/java/).


Written by Keith Wood (kbwood@iprimus.com.au).