Advanced insertion

From FitPlot 2.6 each image (or group of images) you insert or drop in the work area may have some preset automatically applied.
You can control this behavior from the preference panel (insert tab), just click on the icon preferences in the tool bar.

You can even set this automatic task on / off acting on the tool bar button auto insert operations OFF or auto insert operations ON.

If the button is not visible (it is not by default!) modify the tool bar to include it (see toolbar customisation to know how).
Using this feature lets you import and show a folder of images, showing them resized and tidily laid out, optionally showing each one its file name tag as in the example in the shown picture.

Insert preferences

Here you can establish how to behave when inserting new images on the FitPlot area (ask each time, apply presets, do nothing). The settings regards resizing, constraining height or width, rotating and applying styles as well as nesting after insertion.

  • Width, Height, max dim. (between width and height) and Scale% let you resize the newly imported images. To be neutral in resizing, choose scale % and leave 100 as value.
    Constraining the resize to max dim allows a "balance" between "portrait" and "landscape" images.
  • Rotation lets you rotate of the given angle (in degrees) the just imported image. Leave 0° for no rotation at all.
  • Orientation put all inserted images in portait / landscape mode. This may be useful, together with auto resize and nesting, whenever you want to print a set of photos in a grid (2x2 or more images per page).
  • Style: here you can choose one or more from the available styles in the popup list.
  • Pack after insertion: check this to automatically pack all objects currently in the FitPlot document. The nesting is done accordingly to the nesting preferences.

Relinked images constraints

Since 5.5 version we have 3 options when replacing an image with another, using the relink feature ([change] button in the info panel or double click on the image).
These options are:

  • Same source scale %: this is the old behavior, the replacing image assume the scale % of the source.
  • Fit source box: in this case the replacing image is scaled to match opportunely one side of the box, centering the image in the box and leaving blank the exceeding spaces.
  • Fill source box: with this option, the box is entirely filled by the replacing image, scaling it opportunely and cropping the exceeding part to maintain the source ratio.

Nesting preferences

The nesting algorithm has been strongly improved with the adoption of the MaxRects algorithm (thanks to a fundamental work of Jukka Jylänki).
It includes three possible behaviors:

  1. the first suitable for users with single page printers,
  2. the second suitable for plotters where the width is the roll width and the height is virtually unlimited and
  3. the third is just to pack images in a user defined area.
  • Add needed pages (single pages printers): in this case, the algorithm will try to fit images in the page area (if it is possible).
    When the area is full, a new page is added and filled with the remaining images, and so on until no image has left.
  • Expand / shrink area (plotters with roll): this time the page will be only one, but its size will vary, shrinking or expanding to contain all images.
    Images are placed fitting the width of the roll and increasing the page length any time is needed (new rows).
  • Pack in area: when insertion is done, the user will be prompted to define the area where the images should be packed. This area is defined by a mouse click and drag.
  • Gap: this value will be added to separate adjacent images.
  • Allow 90° rotation: if checked, a calculation will be performed to see if there is a convenience rotating 90° some image (in terms of Y values reached). If convenient the algorithm is performed with possible rotation on some images.
  • Do not consider margins. Performs the nesting using the whole page size, putting objects even in the no-printable area of the page.
  • Resize image (when needed). When images are too big to fit the available area, they are proportionally resized so that that nesting can be performed.
  • Pack only selected objects: the nesting algorithm will consider only the currently selected objects. Note: at insertion end, the just imported images are the only one to be selected.
  • Pack all objects: the nesting is performed on all objects currently inserted in the FitPlot document.
  • MaxRects heuristics: see here below.

The MaxRects Algorithm

MaxRects heuristics. The MaxRects algorithm "decides" to give a "score" when placing an image in the available area. This score is calculated by the algorithm in different ways basing its decision on heuristic methods. Different methods may yeld different (usually slightly) results.
The algorithm is very fast, so you should not to worry to keep all heuristic methods ON. The nesting operation performs all the checked heuristics off-line, examines the results (number of pages for the multipage nesting, max reached Y for the single resizable page) and chooses the best, then re-executes the nesting with the best method until the end. This may be matter of a heart-beat, in most cases, but when dealing with hundreds of images, it may make a difference in calculation time, this is the reason why I let the option to put OFF up to three of four methods.
At the moment we have 4 heuristic methods:

  1. BSSF Best Short Side Fit: Chooses the images whose fit better in its short side. This is elected as default and obligatory algorithm (you have to use one!) since is the more suitable for general cases.
  2. WSSF Worst Short Side Fit: This is the reverse of the BSSF. It is optional.
  3. BLF Bottom Left Fit: This tries to keep the pack as low as possible, it is suitable for page resizable nesting, cause results in a minor height (waste) of the resulting page.
  4. BAF Best Area Fit: Another interesting way that prefers the best area fit score.

Other methods may be added in the future, I'm working on it.