Image buffers let you view images in several standard formats.
Image buffers are an experimental feature. If you want to use experimental features, add this line to your preferences file:
enableExperimentalFeatures=trueYou can view an image by opening an image file in any of the normal ways: the Open File dialog, on the command line when starting j, or from a directory buffer. gotoFile, mapped by default to Ctrl Shift G, is particularly handy in HTML and HTTP buffers.
The directly supported image formats are GIF and JPEG. PNG is also supported directly if you're running Java 1.3.
If JIMI is in j's CLASSPATH, additional formats are available. If you're building j from source, you'll need to edit the generated shell script and/or batch file manually to add JimiProClasses.zip to the CLASSPATH.
J uses a regular expression to control which files are opened in Image mode. This is the default setting:
ImageMode.files=".+\\.gif|.+\\.jpe?g|.+\\.png"You can change this by specifying a different regular expression in your preferences file. (You'll probably want to do this if you use JIMI.)
In Image mode, the command imageFit, mapped by default to 'f', can be used to scale the image to fit the current edit window. The aspect ratio of the original image is preserved.
You can use imageZoomIn, mapped by default to '=', and imageZoomOut, mapped by default to '-', to zoom in or out on the image.
imageRestore, mapped by default to 'r', restores the image to its original size.
imageCycleBackground, mapped by default to 'c', changes the background color of the image. You can use this command repeatedly to cycle through a small number of plausible background colors (currently gray, black and white).