This project is not covered by Drupal’s security advisory policy.

ImageCache Scale-9 Actions

Additional actions for imagecache processing using scale-9 image formatting. The actions include:

  • Overlay (scale-9) - Position a selected file in a layer above or below the canvas.
  • Resize (scale-9) - Resize an image to an exact set of dimensions, ignoring aspect ratio.
  • Scale (scale-9) - Resize an image maintaining the original aspect-ratio (only one value necessary).
  • Random switcher - Randomly switch between selected presets.

Scale-9 formatting lets you define 9 regions of an image overlay (or underlay) that will scale independently. The 9 regions are defined by giving left, top, right and bottom values. The left and right values being pixel offsets from the left edge of the image, and the top and bottom values being pixel offsets from the top of the image, resulting in a 3x3 grid. This is a standard method of UI skinning in Adobe Flash/Flex.

A simple example is the module image to the right. The same frame overlay image is placed 3 times in different sizes without any apparent distortion to the edge and corner areas.

This module only works with GD for the time being.


Based on code from the ImageAPI and ImageCache Actions modules.

Demonstration Page (Exhibits the Overlay (scale-9) and Random switcher actions.)

Project information