This document describes a Gimp plugin for loading Minolta RAW format (.MRW) files as produced by the DiMAGE 5, 7, 7i, 7Hi, and A1 cameras into the Gimp. This plugin is part of the mrwtoppm package.
This document describes version 0.0.a13 of the plugin.
The image in the preview panel on the right is a reduced size rendition of the image being opened. By default, the preview image is generated by averaging blocks of pixels, then scaled to fit within the preview pane. In this case it's a DiMAGE 5 image generated by averaging 8x8 pixel blocks. Using the buttons below the preview pane, the preview image can be magnified or shrunk (within limits), rotated, and (if larger than the preview pane) panned. These operations are supported by scaling the preview image, since generating a new one for each such operation is too slow. Note that whenever the image processing parameters are changed, a new preview image is generated. The current state of new image generation can be monitored using the progress bar below the preview pane.
Using averaging produces obvious artifacts, the most obvious being loss of detail and altered sharpening effects. You can change the degree of averaging to use, if any, in the options panel (described below) and set the initial value in the plugin's initialization file.
You can select a subregion of the image by pressing the middle mouse button
inside the preview pane and sweeping out the desired subregion. If the
control key is pressed when the middle mouse button is pressed, the current
selection will be adjusted by moving the corner closest to the mouse.
Pressing the right mouse button over the preview pane will display a popup menu. This menu includes four entries for zooming the image similar to those displayed below the preview pane. It also includes entries for cropping the image and setting the grey world region (described below under color control).
Selecting crop from the preview pane popup menu will restrict the generated
image to the selected region.
The previous crop region, if any, is saved so that you can undo a crop operation
by selecting "pop crop" from preview image pane pop-up menu.
In the following screenshot, a region around the barge is selected:
If the crop region is very small, as in the above figure,
the reduction in detail caused by pixel averaging will be obvious.
To eliminate this affect, the amount of averaging can be reduced.
Since the generated image is small, interactive performance is still reasonable:
The crop operations also save and restore the current level of pixel averaging. Thus, you can crop to an interesting region of the image, reduce the amount of averaging to observe detail and fine tune filtering options, and quickly return to the full image view.
After obtaining the desired rendition of the image by adjusting the various parameters in the other controls, clicking on the OK button in the bottom right will cause the image to be loaded into the Gimp and this window to disappear. Note:If the image has been cropped, only the current crop region will be loaded.
The remaining controls are grouped into notebook pages to the left of the preview page. A new notebook page can be selected by clicking on the corresponding tab.
The Presets subpage lets you select the desired color balance from a menu of preset color balances or automatic white balance algorithms. You can also mix any two preset color balances by adjusting the slider.
Selecting Auto from a White Balance menu will use the estimated color balance stored by the camera in the RAW file. (So, if you manually select Daylight on the camera before taking the picture, you'll effectively get Daylight balance here too.)
The White Balance menu also includes three algorithms for computing a suitable white balance from the pixels in the currently selected greyworld region (or the entire image if no greyworld region has been selected).
The Manual subpage lets you select the desired color balance
by manually adjusting the gain applied to each color channel.
When the Manual color balance subpage is selected, the values in the color gain spinbuttons are set to the appropriate values for the current White Balance.
You can manually adjust the individual color gains by
One of the Color Balance menu entries is User Defined. The button below the color selection subpage will set this entry to the current white balance.
The three average level text fields below the button for setting the User Defined balance show the relative average level of each primary color in the picture, after color balancing. The values are normalized so that the brightest color channel has a value of 1. You cannot change these fields directly.
The final control in this section controls the color saturation. A value of zero leaves the colors unchanged. Positive values increase color saturation and negative values decrease it. A value of -5 eliminates all color, giving a grey-level output. The spin button controls can be used to change this control by either 0.1 (arrow keys, left button) or 1.0 (page up/down, middle button).
The value of the Darkness spinbutton control is subtracted from the Luminance of each pixel. Each pixel is then scaled so that the maximum pixel brightness does not change. Increasing this control darkens overexposed images.
The Contrast spinbutton control scales the range of Luminance values in the input. Positive values increase the range allowing underexposed images to be lightened without changing (by much) the darkest pixels.
The Shadows spinbutton control adjusts the brightness of midrange values in the input. Positive values lighten the midrange values.
The Tone Curve menu further scales the Luminance values by a non-linear function, usually in order to bring out shadow detail. The default tone curve (Minolta) scales the input in much the same way as the special tone curve found in Minolta's profile for raw images. Other available choices are several tone curves developed by Bryan Biggers, and None. At the moment there is no way to specify your own tone curve interactively.
The Luminance Range output shows the range of luminance values in the image after the above adjustments have been applied, but before any subsequent sharpening or other filters have been applied. The maximum possible range is 0 to 100. The histogram displays graphically the image's luminance values from 0 at the left to 100 on the right. The luminance values in this display have been calculated after the sharpening and other filters described below have been applied, and so will likely contain values outside the range shown in the panel above.
The Radius control determines the number of pixels on each side of the pixel used to compute the blurred pixel value.
The Blur control determines the relative weighting of the center pixels to the perimeter pixels. For exactly what it means I'll need to read the source again.
The Lightness control determines the amount of sharpening to apply to the Luminance of each pixel. Positive values sharpen the luminance, negative values blur it.
The Color control determines the amount of sharpening to each of the color channels. In the above example, the color channels are blurred by 0.5.
NOTE: These controls will be applied to the preview image, but if the final image is a different size, the effect can be quite different.
For sizes other than full-sized, no interpolation is used. Fixed-size blocks of pixels (2x2, 4x4, 6x6, 8x8, or 10x10) from the input are averaged to get each output pixel. If the CCD size is not an even multiple of the block size, a small number of pixels around the edges of the image are discarded.
Notes:
These parameters cannot be controlled interactively, but can be changed (with an editor) during a single gimp session. Changed parameters will take effect the next time you open an image.
The following parameters are recognized by the gimp plugin:
For example, the following entries would force the use of Minolta's DiMAGE5 raw profile as the camera's color space, and Adobe RGB as the output color space for all programs in the package. The gimp-specific options specify a one-quarter sized preview, and a 256 pixel wide by 128 pixel high luminance histogram.
cprofile=MLTDim5r.icc oprofile=AdobeRGB1998.icc [gimp] previewSize=4 hwidth=256 hheight=128
Therefore, you can load an initial preview of the image at a reduced size, say half size. If you open it again, the control values will initially be set to the same control values used to load it previously, allowing incremental adjustment.
There is only one set of saved values, so when loading a different image the initial values may be very inappropriate. For example, if you have to increase the Contrast setting to load an underexposed image, when you subsequently load a properly exposed image it will initially be too bright.