Returns the part of fm for which the x coordinate is x-start ≤ x < x-end and the y coordinate is y-start ≤ y < y-end.
If x-start ≥ x-end, the result is width 0, and if y-start ≥ y-end, the result is height 0.
The interval arguments may identify a rectangle with points outside the bounds of fm.
In this case, the points’ values in the returned flomap are 0.0, as per the Conceptual Model.
This function is guaranteed to return a copy.
, but returns fm
, and x-end
are respectively the width and height of fm
Use subflomap instead of flomap-copy when programming functionally.
Every library function that returns parts of a flomap (such as flomap-trim and flomap-inset) is defined using subflomap.
Shrinks fm to its largest nonzero rectangle.
If alpha? is #t, it uses only component 0 to determine the largest nonzero rectangle; otherwise, it uses every component.
This function cannot return a larger flomap.
Extends fm by some amount on each side, filling any new values with 0.0.
Positive inset amounts grow the flomap; negative insets shrink it.
Large negative insets may shrink it to 0×0, which is a valid flomap size.
Shrinks or grows fm to be size w×h.
The proportion of points removed/added to the left and top are given by left-frac and top-frac;
e.g. left-frac = 1/2 causes the same number to be removed/added to the left and right sides.
You will most likely want to use one of the following cropping functions instead, which are defined using flomap-crop.
These shrink or grow fm
to be size w
The two-letter abbreviation determines which area of the flomap is preserved.
For example, flomap-lt-crop
(“flomap left-top crop”) preserves the left-top corner:
Scales fm to a proportion of its size.
Uses bilinear interpolation to sample between integer coordinates, and reduces resolution (blurs) correctly before downsampling so that shrunk images are still sharp but not aliased (pixelated-looking).
, but accepts a width w
and height h
instead of scaling proportions.
If either size is #f
, the flomap is scaled in that direction to maintain its aspect ratio.