FANDOM


Some time ago I asked in this thread, whether a tool which helps to scale images and create GIF-animations would be useful. A user (GandalftheTurquoise) said, that something like this would be "much more efficient". So I announce ImageUtil, a tool which can scale images and create GIF-animations in an easy way. It is divided in three "modules":
With the first module, you can scale images to a speficied size or by a factor.
The second module helps you, to create GIF-animations: You also can specify the delay between the images and whether the animation should loop continuously.
The third module, the "Wiki-Module", allows you to scale images and "combine" them to a GIF-animation with one single (and very simple) GUI. See blow for more informations.

In you are interested in this tool: Download is here

IMPORTANT: ImageUtil does require Java 8 (Download ). 

If you have suggestions, questions, criticism or you want to report a crash/bug you have found, please do this. You can write a comment, leave a message on my message-wall [...]. If you're going to report an error/crash, please give me informations (like the error-message, how I can reproduce it, [...]).

Credits:

I used GifSequenceWriter from Elliot Kroo (elliot[at]kroo[dot]net), which helped me to create the GIF animations; downloaded from: http://elliot.kroo.net/software/java/GifSequenceWriter/.
It is provided under Creative Commons Attribution 3.0 Unported License, which can be found here.
I made a few changes, that are listed in Credits.txt (it can be found in the .jar; you can also access it via the menu About).
The rest of the tool was written by me.

How it does work:

Part1: Getting started
First, make sure that you had installed Java 8, otherwise the program won't work. Then you have to download ImageUtil from this URL (it's the same as above).
Drop the downloaded .jar in a folder of your choice and double-click it (the .jar) to start ImageUtil. It may take some seconds, but then you should see this screen:
ImageUtil-MainScreen

You can see three tabs: Wiki, GIF Creator and Image scaler (does a - miss?). These are for the three modules of ImageUtil, which are described below. At the top a menu-bar can be seen, which has two menus: Settings and Help. Settings does contain (surprise) some settings, and Help has two menu-items: About and Search for updates. They do exactly what their name says: Search for updates trys to check whether a new version is avaible (you need an internet connection for that) and About shows some infos about ImageUtil. You can click the "link" Credits, to see the file Credits.txt, which can also be found in the .jar.
There is also an menu-item Manual, but it's currently disabled.

Part2: The image-scaler
The first module of ImageUtil is the image-scaler. It allows you, as the name says, to scale images. You have two options: You can scale the images to a specified size, or scale them by a factor, which sets, with which factor the width/height of the current images will be multiplied. Don't try too large factors (bigger than 100), because the program probably will crash (OutOfMemoryError...).
But let us start from the beginning. This is the GUI of ImageUtil's "image-scaler":
ImageUtil-Scaler

First we have to add our images: To do this, press the button Add. A dialog will open, with which you can select the images you want to add. The dialog has a filter, which only shows supported image-types. Select the image you want to add, or several by holding SHIFT and selecting them with UP, DOWN, LEFT or RIGHT. You can select all images in a directory by pressing CTRL+A. Then press Open. The images are now going to be loaded into the program. If you have selected many/large images, it can take some time. If loading is finished, all loaded images can be seen in the white listbox. A right-aligned label below the box shows the count of images loaded in the box. You can select one image by clicking on it's entry in the list. If you want to remove a loaded image, select it, and press the button Remove. You can clear the list by clicking at Clear all. If some of your loaded images have changed in the filesystem, but their path is still the same, press Refresh to update the loaded images. You can change the order of the images by dragging their entries in the list with the mouse. This is important for the modules Wiki and GIF Creator, because the order of the images in the listbox is equal to the order of the images in the created GIF-animation. All modules contain this image-loading mechanism, and it's only explained here, because it's the same for all modules.

Now we want to set, how the loaded images are scaled. As you can see in the image, we have two options: First, we can scale all images by a scale-factor, which is a factor that is multiplied to the current width/height of the loaded images. Second, we can set a width and a height to which the loaded images will be scaled. To scale by a factor, select the radio-button Scale by factor, to scale to a specified size, select Scale to size. Then enter the required values in the text-field behind the radio-buttons (the scale-factor can be a point number, the size has to be an integer).
Now the program wants to know where it should export the scaled images: You can enter a path in the text-field below the radio-buttons, or, you can press Select, to select the export-directory via a dialog. This dialog has a filter, so that it only shows directories. The scaled images will have the same name as they currently have, with the exception that a "_scaled" and perhaps a number is added to their name (the number is added, if an image with the same name does already exist in the directory).
Finally, press the button Scale to start scaling. Depending on the amount of images you have selected, their size and the scale-factor/size, it can take a while. If some of the data you entered are wrong, you'll be informed.

Part3: The GIF-animation creator
The second module of ImageUtil is the "GIF Creator". It allows you, to select images, change their order, and create a GIF-animation from them. You can enter the delay between two images, and specify, whether the animation should loop repeated or not. So here's a screenshot of the GUI:
ImageUtil-GIF-Creator

To load images into the program, click the button Add. Loading of images works equal as in Part 2. Important: The order of the images in the listbox is the order of the images in the GIF! You can move an entry by dragging it with the mouse.
In the next text-field, you can specify the animation-delay: This is the delay in the GIF-animation between two images. The value you have to enter (default: 1000ms) is in Milliseconds (one Second is equal to one Millisecond).
The ckeckbox below sets, whether the animation should loop repeated or not.
Then set the export-destination for the GIF, it works same as in Part 2. The exported GIF will be called "output.gif" (and perhaps has a number).
To create the GIF, press Create GIF.

Part4: The "Wiki-Mode"
The third module of ImageUtil is the module "Wiki". It's purpose is, to scale and create images with a small amount of work. You can already scale images with the Image scaling module and create a GIF-animation with the GIF module from them, but for this you would have to load them twice in the program and switch between two modules. So this module is optimized for "Wiki-users", who want to scale the Mod's textures by a factor which is constant, and want to create a GIF-animation directly. But first, here's the GUI:
ImageUtil-MainScreen

You can see the same components to load images, set the export location and start scaling/creating the GIF. The images you have loaded in the list are scaled by factor 10, then the program creates a GIF-animation, looping repeated, with a delay of 1000ms. These values can be changed in a dialog that can be accessed by clicking the menu-item Configure Wiki-Properties in the menu Settings. It'll open this dialog:
ImageUtil-Settings

You can enter the new values of the animation-delay and/or the scale-factor in the Wiki module. By pressing the button To default behind the text-field, you can set the properties to their default values (delay: 1000ms; factor:10.0). To accept the changes, press Accept, to cancel, click Cancel.

Part5: Miscellaneous
The program has a version-checker, that runs automatically on start. But you can manually search for new versions by pressing Search for updates in menu Help.

Community content is available under CC-BY-SA unless otherwise noted.