I'm working with images in a plugin but getting a bit stuck reading a transformed image.
Given the following code:
$assetTransform = new AssetTransform([ 'mode' => 'stretch', 'width' => 64, 'height' => 64, ]); $transformedAsset = $asset->copyWithTransform($assetTransform); $image = imagecreatefromstring($transformedAsset->getContents()); $width = imagesx($image);
...I would expect the value of
$width; to be
64. But it returns the width of the original untransformed image.
Incidentally, the width of
Does anyone understand why this occurs?