You are here: Web API Functions > getimage > fitinside

fitinside

The fitinside method is identical to the fit method, except that whereas the fit method returns the natural level whose dimensions best match those of the requested bounding box even if it must be clipped to fit the bounding box, the fitinside method returns the natural level that best fits the entire selected region inside the bounding box without clipping.

Example: 400 x 400 bounding box request using fitinside method

Request:

http://demo.lizardtech.com/lizardtech/iserv/getimage?cat=Geo&item=BLM_relief.sid&wid=400&hei=400&method=fitinside

Result:

In this example, the largest natural level that fit the bounding box without any clipping measures 227 x 160. Since the resulting image must measure 400 x 400, the requested region is expanded to fill the requested bounding box. The entire requested region is returned and the aspect ratio remains unchanged.