Jmagick error : magick.MagickException: No image to scale

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
karim_sousse
Posts: 1
Joined: 2012-05-10T02:40:52-07:00
Authentication code: 13

Jmagick error : magick.MagickException: No image to scale

Post by karim_sousse »

Hello,

Normally this topic should be posted on the Image Magick program Interface section, but unfortunately I didn't found JAVA programming interface section, so I posted my problem here to share it with developers.
I have installed Image magick 6.4.0 and JMagick 6.4.0 Q16 on my Ubuntu 11.10
I tried the following piece of code on Eclipse to test jmagick integration :

try{
ImageInfo info = new ImageInfo("myPic.jpg");
MagickImage image = new MagickImage();
MagickImage bigger = image.scaleImage(1200, 900);

bigger.setFileName("bigger.jpg");
bigger.writeImage(info);
} catch (MagickException e){
e.printStackTrace();
}

When running a simple main class, I get the following exception :

magick.MagickException: No image to scale
at magick.MagickImage.scaleImage(Native Mehtod)
at comcom.myCompany.image.ImageTest.main(ImageTest.java:20)

Does any one faced/solved the same problem

Thanks in davance for your help

Karim.
Post Reply