📚 Looking for current Exponential documentation? This site contains legacy SDK & API reference docs (eZ Publish era). For up-to-date 2026 product documentation, visit doc.exponential.earth.

  ezimage / scaling  

<< Image conversion   

Scaling

The code for scaling the image is similar to the conversion code but adds a rule that states the width and height of the destination image.

$source = "lib/ezimage/sdk/images/bike.jpg";
$dest_img = $img->convert( $source, "var/cache/image1-scale",
                           array( "width" => 200, "height" => 200 ),
                           array( array( "rule-type" => "colorspace/gray" ) ) );

print( "<img src="/$dest_img">" );

Exponential Copyright © 1998 - 2026 7x