flimp

flimp is a generic graphical frontend to the many excellent command line image manipulation tools available. It allows to create pipelines of commands that read from standard input and write to standard output. One can view and compare the result of each stage of the pipeline. flimp leaves the input image file untouched. One rather saves the pipeline in a text file.

Features

  • non-destructive image manipulation
  • easy to extend and customize
  • flimp is small (currently less than 2500 LOC)
  • support for 16bit color depth
  • import of raw images via dcraw

Requirements

Recommended

Getting Started

Start flimp and load an image (File->Open Image). Convert it to PNM using Convert->PNM. Choose some of the predefined filters from the Filters menu and see what happens. You can rearrange or remove the stages in your pipeline using the Tabs menu. Or create your own filters using (Tabs->Generic): Simply enter a command that accepts an image on stdin and writes the result to stdout. Press Enter and the command is executed and the result is shown. Some of the predifined filters have a "GUI" button on the lower left side (e.g. Enhance->Gamma, Enhance->Unsharp, Transform->Rotate). Press it to start an external GUI program for parameter adjustment.

Image Formats

flimp supports the display of jpeg, png, pnm, and gif images directly. To work on images in other formats (e.g. tiff) just put a "anytopnm" stage at the beginning of the pipeline, which is generally a good idea, as PNM is a lossless format and many netpbm tools expect PNM as input. If you want to work with raw images put a Dcraw step at the beginning of the pipeline.

Loading and Saving

With flimp one can load and save images (File->Open Image, File->Save Image) as in other image editors. Note that Save Image will save the image shown in the current tab in whatever format it is. So often one would add a conversion to JPEG (Convert->Jpeg) before saving. Additionally flimp allows to save the current set of tabs in a text file (File->Open Flimp File, File->Save Flimp File). This way one can continue editing an image at a later time. Flimp will automatically preselect a filename derived from the image filename for saving and loading flimp files.

Coordinate Transformation

flimp allows to exchange Crop and Scale steps such that the "right thing" happens. E.g. you insert a Scale step so that you can see the whole image. Then select a part of it using a Crop step. Later you can remove or adjust the Scale and Crop will still select the same part of the image. To make this work flimp stores coordinates in the coordinate system of the original image. You can tell flimp that a number in a command is a coordinate or modifies the coordinate system by preceeding the number with one of the following prefixes:

  • _x x-coordinate
  • _ox shifts the coordinate system in x-direction
  • _X x-coordinate that shifts the coordinate system in x-direction
  • _y y-coordinate
  • _oy shifts the coordinate system in y-direction
  • _Y y-coordinate that shifts the coordinate system in y-direction
  • _v value should be scaled vertically
  • _V scales the coordinate system vertically
  • _h value should be scaled horizontally
  • _H scales the coordinate system horizontally
  • _S scales the coordinates system horizontally and vertically
  • _fx scales the image to fixed width
  • _fy scales the image to fixed height

Additionally flimp expands _$ to the input file of a command. This is useful for programs that do not support reading from stdin.

Examples:

convert -scale _S30% - -
convert -crop _h100x_v100+_X20+_Y30 - -
convert -pointsize _v20 -annotate +5+5 "Hello"
dcraw -w -c _$

Customizing

You can adjust the filters available from the menubar by copying the flimprc.sample file to $HOME/.flimprc where you can edit it as you like.

External GUI Programs

flimp supports the use of external programs to conveniently manipulate the command line parameters of image manipulation programs. E.g. changing the control points of a tone curve manually is quite difficult. External GUI programs can be specified in the flimprc file (see flimprc.sample for examples). Pushing the "GUI" button will then launch the provided GUI program. It will be fed the current command line to stdin and is expected to write the modified command line to stdout. A generic such program "flimpgui" is provided in the flimp tarball. The pnmcurve tarball also contains a GUI tool to create and modify spline curves.