<?php
//Set size first and then load the raw image
$img = new Imagick();
$img->setSize(200, 400);
$img->readImage("image.rgb");
$img->scaleImage(400, 800);
$size = $img->getSize();
print_r($size);
echo "$img->getImageWidth()."x".$img->getImageHeight();
?>
The above example will output:
Array
(
[columns] => 200
[rows] => 400
)
400x800