joomla/joomla-cms — pull request #1565 by piotr-cz (2013-07-19 10:41:08+00:00)
Title: Feature: JImage scaling method: SCALE_FIT

New scaling method: Scale to fit given boundaries.
result is centered vertically to center and horizontally to middle.

## Usage
...

## Example
Original image (150x35)
![powered_by](https://f.cloud.github.com/assets/612953/825245/74a3b170-f05f-11e2-87e8-db846b78d983.png)

Scaled to 96x96
![powered_by_transparent](https://f.cloud.github.com/assets/612953/825247/8b02b8a8-f05f-11e2-8bf6-d3ef99033446.png)

Scaled to 96x96 with using backgorundfill filter
![powered_by_white](https://f.cloud.github.com/assets/612953/825250/990e99b2-f05f-11e2-96d3-259630cfc1a1.png)