1

So I'm trying to write a simple program that will change the type of an image from a .png to a .tiff using jmagick in java. I followed a tutorial that i found online for different image formats located Here. The program compiles successfully but when I run it I get this message:

Process finished with exit code -1073740940 (0xC0000374)

This is my code:

System.out.println("I'm at 0");
String inputfileName = "C:\\Users\\MySelf\\IdeaProjects\\tess4jTest\\p1.png"; //Input PNG file
ImageInfo info = new ImageInfo(inputfileName); //Get PNG file into ImageInfo object
MagickImage magick_converter = new MagickImage(info); //Create MagickImage object
System.out.println("I'm at 1")
    String outputfile = "C:\\Users\\emctiern\\IdeaProjects\\tess4jTest\\p01.tiff"; //Output File name
    magick_converter.setFileName(outputfile); //set output file format
    magick_converter.writeImage(info); //do the conversion
    System.out.println("I'm at 2");

My code never actually reaches the print 1 and 2, I think it might be that its not sure where to get the file from, That's why I entered the the full file path. In the tutorial I followed they just had the image name and nothing else. Thanks in advance

emcconville
  • 23,800
  • 4
  • 50
  • 66
  • The link that you have specified for the tutorial has different code than what you have. Your code don't have DrawInfo anywhere not sure does that affect the output or not :) :) – Bilbo Baggins May 29 '15 at 11:49
  • whoops my bad, I actually linked the wrong tutorial, Thanks for pointing it out :) –  May 29 '15 at 11:57
  • try surrounding your code with "try catch block" and print appropriate exception. – Bilbo Baggins May 29 '15 at 12:27
  • I did do that , Nothing showed up, Just the exact same message, I now just have the main throwing the exception. –  May 29 '15 at 13:13
  • Seems something wrong with version(dll files if you are using) that you are using. As it's not the JVM error(my guess) – Bilbo Baggins May 31 '15 at 16:17

0 Answers0