[img_zoom/]


[img_zoom/] resizes an input image proportionally to some percent of its original size, then crops the image to the requested width and height. The default output dimensions are the same as the input. The focus parameter specifies one of nine (9) positions. The default X crops the result from the center of the image. The values NW|NE|SW|SE select the corners; the values N|E|S|W select the sides.

[img_zoom output="{format}" percent="{int}" width="{int}" height="{int}" focus="{X|N|E|S|W|NW|NE|SW|SE}"]<source>[/img_zoom]

percent

The source image is scaled by the requested percent first. Then, the remaining parameters – width, height, focus – are applied. If percent > 100, the default result is the same size as the original, cropped from the center of the enlarged image.

[img_zoom output="img" percent="200"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_x_0_0.gif" width="172" height="242" alt="atest.gif" />

dimensions

The width and height parameters define maximums. If one is given but not the other, the result has the same proportions as the input. If both parameters are given, the result has the requested dimensions.

[img_zoom output="img" percent="200" height="200"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_x_0_200.gif" width="140" height="200" alt="atest.gif" />
[img_zoom output="img" percent="150" width="200" height="200"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_x_200_200.gif" width="200" height="200" alt="atest.gif" />

focus

The default – focus="X" – extracts the final result from the center of the zoomed image. This is the behavior shown above. But, there are eight (8) other focus options, corresponding to cardinal compass-points and their combinations. As noted above, the values NW|NE|SW|SE select corners, and the values N|E|S|W select sides.

[img_zoom output="img" percent="200" focus="N"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_n_0_0.gif" width="172" height="242" alt="atest.gif" />
[img_zoom output="img" percent="200" width="200" height="200" focus="SW"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_sw_200_200.gif" width="200" height="200" alt="atest.gif" />
[img_zoom output="img" percent="200" width="200" height="200" focus="SE"]atest.gif[/img_zoom]
atest.gif
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/zoom_200_se_200_200.gif" width="200" height="200" alt="atest.gif" />