At the end of method MagickReadImage, MagickReadImageBlob and MagickReadImageFile, the wand->image was pointed to the last frame in the image list. For multi-frame image, the image index should be set to 0 (first frame) before any transforming process.
Invoke MagickSetImageIndex after reading image, e.g.
-- Setting the image index:
function Image:setImageIndex(i)
clib.MagickSetImageIndex(self.wand, i or 0)
end
...
image:setImageIndex(0)
image:size(120, 120)
At the end of method MagickReadImage, MagickReadImageBlob and MagickReadImageFile, the wand->image was pointed to the last frame in the image list. For multi-frame image, the image index should be set to 0 (first frame) before any transforming process.
Invoke MagickSetImageIndex after reading image, e.g.
or add new method: