I've a code for some conversion any images via ImageMagick + JMagick. On my local PC my code work fine, but not on server. ImageMagick installed completly, delegates presents too. Some IM tests, such as
convert myfile.png -resize 500x300 111.png
works fine.
//open template. Source is valid path to file, file exists
ImageInfo voucherImageInfo = new ImageInfo(templateSource);
logger.info("Create imageInfo for template '{}', result - '{}'", templateSource, voucherImageInfo);
MagickImage voucherImage = new MagickImage(voucherImageInfo);
logger.info("Voucher image - '{}'", voucherImage.getImageFormat());//there are exception
This code
public Dimension getImageGeometry(String filename) throws MagickException {
ImageInfo imageInfo = new ImageInfo(filename);
MagickImage mi = new MagickImage(imageInfo);
return mi.getDimension();
}
falls too with exception: magick.MagickException: Unable to retrieve handle
I guess some problem with JMagick, but how I can check it? I've tried re-install JMagick, but it was useless. Any ideas?