Images are composite objects. While metadata about images can be managed in a Collection Service, the purpose of querying and working with metadata is normally to identify binary image objects that an application will then want to work with.
Image Processing Services provide functionality for directly manipulating image data identified by a standard identifier from a Collection.
The network service uses image processing functions from the NIH Image library. The initial version allows a single operation to be applied to an image, and choice of PNG, JPEG or TIFF as an output format. Requests provided in the initial implementation:
| Request name | Summary | Parameters |
|---|---|---|
| GetImage | Retrieves unmodified image by ID number. | Required: id
Optional: format (PNG, JPG or TIFF) |
| Convert | Returns image in one of three supported formats | Required: image id; format |
| Scale | Resizes the requested image proportionately. | Required: image id; percent
Optional: format (PNG, JPG or TIFF) |
| SetAbsoluteWidth | Resizes the requested image to an absolute width (in pixels); height is scaled proportionately. | Required: image id;
desired width.
Optional: format (PNG, JPG or TIFF) |
| SetAbsoluteHeight | Resizes the requested image to an absolute height (in pixels); width is scaled proportionately. | Required: image id;
desired height.
Optional: format (PNG, JPG or TIFF) |
| SetAbsoluteSize | Resizes the requested image to absolute dimensions if possible, but preserves image proportions. If requested dimensions would result in disproportionate scaling, resizes to smaller proportion (so, in effect, the width and height values serve as maxima). | Required: image id;
width;
height
Optional: format (PNG, JPG or TIFF) |
| GetSubimageByPct | Get subsection of image by percentage values: supply the and top, left edges as percentages of the image; and the width and height of the subimage as a percentage of the whole. Note that x increases left->right, while y increases top->bottom. | Required:
image id;
x (left edge); y (top edge);
width;
height
Optional: format (PNG, JPG or TIFF) |
| GetAbsoluteSubimage | Get subsection of image by pixel measurements: supply the top, left coordinates, and the width and height in pixels. Note that x increases left->right, while y increases top->bottom. | Required: image id;
x (left edge); y (top edge);
width;
height
Optional: format (PNG, JPG or TIFF) |
| ScaleBrightness | Adjusts brightness of the image. 100% = the current brightness of the image; < 100% is darker; > 100% is brighter. |
Required: image id; Percent brightess
Optional: format (PNG, JPG or TIFF) |