Later, that very same decade....
The issue is that Imagick should be returning an 'AreaPixelIterator' object from getPixelRegionIterator, and a RowPixelIterator when you iterate over that. But instead it just returns a pixel object from both apparently, which leads to confusion.
The code below works and gives the result you were trying to do. I don't think the code will be changed before a new major version of Imagick, but the documentation needs to be improved to show how to use this function properly.
<?php
$width = 320;
$height = 240;
$im = new Imagick();
$im->newimage($width, $height, '#000000');
$im->setImageMatte(true);
$im->unsharpMaskImage(0 , 0.5 , 1 , 0.05);
$im->normalizeImage();
$areaIterator = $im->getPixelRegionIterator(0, 0, 1, 1);
$count = 0;
foreach ($areaIterator as $rowIterator) {
foreach ($rowIterator as $pixel) {
var_dump($pixel->getColor());
}
$areaIterator->syncIterator();
}