Description

This function returns the width of an image in pixels.

Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$image_wdimension = $cpanel->api1('ImageManager','wdimension',array('images','image.jpg')); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $image_wdimension = $cpliveapi->api1('ImageManager','wdimension',['images','image.jpg'] ); # Call the function.

 


<cpanel Module="ImageManager::wdimension($FORM('dir','file'))">




cpapi1 --user=username ImageManager wdimension images image.jpg



700




Parameters

ParameterTypeDescriptionPossible ValuesExample
dirstring

Required

The directory that contains the file to measure.

A valid directory path, relative to the cPanel account's home directory.
images
filestring

Required

The name of the file to measure.

A valid filename.image.jpg

Returns

This function returns the width of the image file, in pixels.