Using strictly the gmagick or imagick libraries for PHP I am trying to convert jpeg2000 data to browser-compatible jpeg. The jp2 works fine, but trying to convert to jpeg seems to just return the same data, no conversion being done.
$image = new Gmagick($_img->getImageBlob());
$image->setImageFormat("jpeg");
Header("Content-type: image/jpeg");
echo $image;
$_img contains the input jp2 data. I want to avoid using exec for conversion using the system library to make this platform independent.