Wize /
Photo Copy
Search:  

Wize adds the enhanced photo copy patch (slightly modified). This patch adds a number of options to the image copy command which can be used in conjuction with Winop to provide advance image manipulation.

1.  -scale xscale ?yscale?

The -scale option is used to resize an image. It takes 1 or 2 arguments which give the scaling, usually between 0.0 and 1.0. If you omit yscale it defaults to xscale.

1.1  Absolute Sizes

If either scale is negative, the absolute value is used in calculating the size for a destination image. eg:

  $outimg copy $inimg -scale -100 -50

The above scales the image to 100x50.

Note: the negative value must be < -1.

1.2  Fit to a Width (or Height)

You can specify one negative dimension and set the other value to -1. In this case that scale ratio will be set to the other scales value (after calculation).

For example, in the following,

  $outimg copy $inimg -scale -100 -1

if the input size was 200x400 then the output will be 100x200.

It is invalid to set both values -1.

1.3  Proportional Fit To Space

If you have a fixed space and want the image to be no bigger than that size, while still being scaled proportionally, just append .5 to negative scales.

For example, in

  $outimg copy $inimg -scale -100.5 -100.5

if the input size was 400x200 then the output will be 100x50. ie. the largest proportionately scaled image that will fit in a 100x100 space.

2.  -mirror ? x | y ?

Flips an image by x, y or both.

3.  -rotate degree

Rotate an image by given degree.

4.  -filter ?Mitchell | Lanczos | BlackmanSinc?

Filter an image.

5.  -blur blur-fact

Blur an image.

6.  -smoothedge 1 | 2

Smooth an image.

7.  -background ?color?

Background color used in smoothing.

© 2008 Peter MacDonald

Page last modified on June 20, 2009, at 06:17 AM