Download & install GRIP
Sections in this page
GRIP is available here free for you to use. Please mention www.grelf.net when describing it or copying it.
All software contains bugs, even if, we hope, they are only extremely subtle ones. The author has tested this software to the best of his abilities to ensure that it is generally fit for its purpose of processing and measuring digital photographs.
The author makes absolutely no claims and gives no guarantees whatsoever as to the accuracy of any output from this software.
Anyone making decisions based on any output from this software has a responsibility to first convince themselves of the appropriateness of so doing. They should test the software for themselves and understand how it works, sufficiently for their needs. Source code and explanatory documentation are available for that purpose.
Requires Java 7 Run-time Environment (JRE) which can be downloaded free from java.com
If you try to run GRIP in an earlier JRE than version 7 you will get an error message similar to this in the command window:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
The solution for this is to upgrade your installed Java to version 7 or later.
- Download the compiled application here. Version 16.1.29 (2.6 Mbytes)
- Unzip the down-loaded file (in Windows right-click and Extract all).
- The file called run.bat is for launching GRIP. You may want to create a short-cut to it on your desk-top.
- You may need to edit run.bat to include the path to your JRE, if java.exe cannot be found in your system.
- Unix users may want to modify run.bat, a Windows batch file, to become run.sh, a shell script.
- If you change "java" to "javaw" in the command line inside run.bat there will be no black console window while GRIP is running. You would not lose any information by doing that because a log file is created on every run.
- You may also wish to alter the -Xms (starting memory) and -Xmx (maximum memory) settings to suit the amount of RAM in your system. By default GRIP will start off using 768 Mbytes and may expand to take up to 1 Gbyte if you open several images at once. It is probably best not to let it try to take all of your RAM. The "About" option on the help menu will show you how much memory GRIP is using at any time.
Important: If your machine has less than 1Gbyte of RAM you really should edit run.bat so that -Xms and -Xmx values fit inside your memory with some to spare. Otherwise the JVM will use all the memory we say it can have but unfortunately some of that will be on disc. In that case when GRIP runs a lot of processing time will be wasted swapping image data back and forth between RAM and disc, and performance will be really slow.
- The class files have been compiled in a Windows JDK but they are intended to be platform-independent. If they do not work on your platform please let me know.
- GRIP uses a package called jrawio, from Tidal Wave, which conforms to the JAI specification and enables RAW files in the formats of the major camera makers to be read. The JAR file for jrawio is included in the download from this page so that such files can be processed.
If you have downloaded a previous version of GRIP, you do not need to download the 3rd party jar files again, you can simply download the new version of the single file GRIP.jar here (1.2 Mbytes).
This diagram shows how the GRIP directory should look for running the application.
With the files arranged as shown above, the commands to launch GRIP (as in the file run.bat) are:
start java -Xms768m -Xmx1024m net.grelf.grip.GRIP
On platforms other than Windows the first of the two lines in run.bat should be modified so that semicolons (;) become colons (:).
I do not have a Mac system but two of my users have sent me information about how they got GRIP running on their Macs.
Thanks to Dustin in Miami, Florida:
I created a simple shell script "run.sh" and placed it into the same dir as run.bat. Its contents contain:
#!/bin/sh DIR=$(dirname "$0") (cd $DIR; export CLASSPATH=GRIP.jar:jai_imageio.jar:clibwrapper_jiio.jar:it.tidalwave.imageio.raw-1.6.1.jar; java -Xms768m -Xmx1024m net.grelf.grip.GRIP)
This allows the user to put the grip_run directory anywhere on the system without hardcoding the paths. All the user will need to do is open up the terminal program which is located in the Applications/Utilities folder and change to the grip_run directory
(or wherever it got moved after it was downloaded, "~/Applications/grip" is where I moved mine) and change the permissions to be executable:
chmod +x run.sh
Once that is done all the user needs to do is right click on run.sh and "open with" terminal. They will have an option to always open this with terminal and if selected all they will have to do is right click and then open.
This seems like a lot, but the other alternative would be to create an "app" which is simple enough, it just would require the user to put the application in a specific directory each time (like ~/Applications). This would allow the user to just double click on it like any other app.
Thanks also to Paul in Leeds, UK, who used this method on his Mac running Mountain Lion (10.8.2):
1. Create a Launcher App
On a Mac it is possible to execute GRIP by double clicking on the 'grip.jar' file. The big problem with this method, is that although it executes the program, it does not carry with it any of the command information such as the correct allocation of memory, which renders GRIP virtually useless when attempting to load an image of any reasonable size.
A way to get around this is to create an executable application using a piece of freeware called 'Platypus' which runs a shell script telling GRIP to execute and exactly how much memory it should allocate to itself. Here is how to do this:
- Download Platypus from here: http://sveinbjorn.org/files/software/platypus.zip
- Run Platypus and in the section that says 'Script Path' click 'new'. This will open a Terminal style window. Delete the little bit of text that says
echo 'Hello, World'but leave all other text remaining.
- Copy and paste the following command:
cd ~/desktop/grip_run java -Xms768m -Xmx1024m -jar grip.jar
(Please remember to replace 'desktop' with the location of where your grip_run folder is stored.)
- Click Save.
- In the 'App Name' section give your app a name. I called mine 'Grip Launcher' for ease.
- Click create and save it in the grip_run folder.
- Close Platypus. Now go to your grip_run folder and there should be your Grip Launcher.app file in there. Double click and hey presto, it launches GRIP successfully.
2. Enable Grip to open/save TIFF files
When attempting to save your image as a 16 bits per channel TIFF file, you may have been presented with one or both of the following error messages:
- "File name does not have a suitable extension"
- "No writer available for your filename.tif"
The reason for this is that, once again, the Mac has not been told where to look for the corresponding .jar files that enable your files to be saved in this format. Here is how to solve the problem:
- In finder, click Go>Go to folder
- In the search box type: /library/Java/extensions
- Open your grip_run folder, then highlight and copy the files entitled 'clibwrapper_jiio.jar' and 'jai_imageio.jar'
- Paste a copy of these files into the opened Java Extensions folder.
- Run GRIP (using your newly created app launcher) and you should now be able to open and save 16-bit TIFF files.
- If you are still presented with "File name does not have a suitable extension", just remember to add .tif to the end of the filename you are trying to save.
GRIP does work in 64-bit systems but it may at first appear not to do so. I have (Oct 2010) moved onto 64-bit Windows 7 and installed 64-bit Java. On this new platform GRIP kept failing with "Out of memory" errors. That can be corrected, as described on my trouble-shooting page.
If you want to access the help files and the programmer's (API) reference ensure you unzip the other downloads as shown in the diagram. Here are the help files:
Download the help files here (2.4 Mbytes)
The API documentation files are available from my programmer's download page.
If you download my software it is yours to do with as you wish but I own the copyright of all of its Java source code. GRIP, being written in Java, is dependent upon Oracle's Java library. Information about the open source library and its licence is available here.
When discussing with others GRIP or your results from it, please mention www.grelf.net.
If you are a developer wishing to modify or extend GRIP there is another page about the source code here.