Hello,
I am new to ImageMagick. Today, I downloaded ImageMagick version 6.2.6 and JMagickVersion 6.2.6
We are using the Q16 or 16 bit version. I put the jar files in the JDK class path and as well installed the DLLs
We have put together some code in java, that tries to instantiate a single Image and tries to scale that image. The code is attached below.
We are facing the problem when instantiating the ImageInfo and ImageMagick objects. The ImageInfo call returns an object, but we checked some attributes like getDepth() and getMagick(). The former returned 0 and the latter returned an empty string. This makes us think that the ImageInfo object is not correctly initalized.
When we try to instantiate the ImageMagick object, the constructor call never returns. The debugger just hangs at the line but we don't get an exception.
The two lines of code are in bold below. Can anyone recommend a course of action. I noticed 1 or 2 people had the same problem on other forums but there was never a resolution posted.
Thanks in advance.
Rohit
----------------
package test;
import java.io.*;
import java.awt.Rectangle;
import magick.ImageInfo;
import magick.MagickImage;
import magick.MagickLoader;
public class Loop {
static {
System.loadLibrary("JMagick");
}
public static void main(String[] args) throws Exception
{
System.out.print("Started");
ImageInfo info = new ImageInfo("300 alarm clock.gif");
String depth = info.getMagick();
System.out.print("Depth is " + depth);
MagickImage image = null;
try{
image = new MagickImage(info);
}catch(Exception e) { System.out.println(e.getMessage());}
image.setFileName("copy_300 alarm clock.gif");
image.writeImage(info);
MagickImage thumb = image.scaleImage(100, 100);
System.out.print("Compleated");
Thread.sleep(1000);
// Force finalization and garbage collection.
System.runFinalization();
System.gc();
}
}
JMagick Trouble Loading file
Re: JMagick Trouble Loading file
yes ,
Finally I am successful Jmagick Image Uploading.Use q16 version of jMagick.dll
There are version missmatching problem,put the jmagick.dll file int programfiles/Java/JDK/Jre/Bin folder and give the put Jmagick.jar file in your javas rogramfiles/Java/JDK/Jre/lib folder or if you are working with the Eclipse the attach the jar file in the program.
Now I am succesful in the croping image,scaling image,rotating Image using Jmagick
Rohit
Finally I am successful Jmagick Image Uploading.Use q16 version of jMagick.dll
There are version missmatching problem,put the jmagick.dll file int programfiles/Java/JDK/Jre/Bin folder and give the put Jmagick.jar file in your javas rogramfiles/Java/JDK/Jre/lib folder or if you are working with the Eclipse the attach the jar file in the program.
Now I am succesful in the croping image,scaling image,rotating Image using Jmagick
Rohit