gmagick geometry
I was running into the following issue:

    // $data contains some image data

    $gm = new gmagick;
    $gm->readImageBlob($data);
    $gm->resizeImage(
        100,
        50,
        gmagick::FILTER_LANCZOS,
        1
    );

    $gm->readImageBlob($data);
    $gm->resizeImage(
        140,
        70,
        gmagick::FILTER_LANCZOS,
        1
    );
    $output = $gm->getImageBlob();

    print_r($gm->getImageGeometry());

will print

    Array ( [width] => 100 [height] => 50 )

which is an unexpected result. If I execute exactly the same code with imagick instead of gmagick, I will get different (expected) result

    Array ( [width] => 140 [height] => 70 )

Also, interestingly, for the gmagick, if I omit the line 

    $output = $gm->getImageBlob(); 

then I get the expected image size 140x70..

Am I missing something essential here?

Thanks!
gmagick geometry
===

I was running into the following issue:

    // $data contains some image data

    $gm = new gmagick;
    $gm->readImageBlob($data);
    $gm->resizeImage(
        100,
        50,
        gmagick::FILTER_LANCZOS,
        1
    );

    $gm->readImageBlob($data);
    $gm->resizeImage(
        140,
        70,
        gmagick::FILTER_LANCZOS,
        1
    );
    $output = $gm->getImageBlob();

    print_r($gm->getImageGeometry());

will print

    Array ( [width] => 100 [height] => 50 )

which is an unexpected result. If I execute exactly the same code with imagick instead of gmagick, I will get different (expected) result

    Array ( [width] => 140 [height] => 70 )

Also, interestingly, for the gmagick, if I omit the line 

    $output = $gm->getImageBlob(); 

then I get the expected image size 140x70..

Am I missing something essential here?

Thanks!