Questions tagged [im4java]

The library im4java provides a pure-java interface to ImageMagick, GraphicsMagick and other popular commandline tools like jpegtran, ufraw, dcraw, exiftool. The im4java-engine permits the addition of new tools in a very short time (less than an hour)

The basic architecture of im4java is quite simple. It boils down to calling all underlying tools simply by using a ProcessBuilder-object. All the magic of im4java ist to hide the complexities. If you have just one simple call of an external tool in your program, you might be better of by hardcoding the ProcessBuilder-call yourself. If you don't need the simplicity or the advanced features of the im4java-library, your code will certainly be faster and more efficient.

73 questions
0
votes
0 answers

when i use imagemagic montage by im4java,the -tile row x clos option throws a file unable to open exception

./magick -version Version: ImageMagick 7.0.8-46 Q16 x86_64 2019-05-19 https://imagemagick.org Copyright: © 1999-2019 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC HDRI Delegates (built-in): bzlib…
conquer66666
  • 59
  • 1
  • 10
0
votes
0 answers

I need help in replacing white background of a png image to transparent using im4java API not by using the command line

I tried to replace the white background of an image with a transparent one using the below lines, IMOperation op = new…
0
votes
0 answers

Imagemagick Im4Java - How to have a caption at one size, on an image of a larger size

I am having a tough time figuring out the sequence of events to have a caption of one dimension. Then have this caption on an image of a larger dimension. Right now my sequence of operations are: IMOperation op = new IMOperation(); …
Kunal
  • 398
  • 2
  • 4
  • 18
0
votes
0 answers

ImageMagick: Im4Java Running from eclipse from MacBook is showing the exception

I'm trying to run im4java to compare the images but I'm getting the below exception message. I have followed the steps to add ImageMagick as in this link: https://www.imagemagick.org/script/download.php#macosx I was getting the same error so, I…
Siva
  • 1,078
  • 4
  • 18
  • 36
0
votes
0 answers

Compare cmd class not being identified

I am using the following code to compare 2 image files but even after downloading required dependecies/jar files CompareCmd class is not getting identified and gives compilation error. import org.im4java.core.* import org.im4java.process.* import…
RV_Dev
  • 435
  • 1
  • 7
  • 21
0
votes
1 answer

ImageMagick: How can I cut out round from image?

I'm trying to make a round avatar out of some image. How can I cut out round from image using ImageMagick?
Kim
  • 5,045
  • 6
  • 38
  • 60
0
votes
1 answer

im4java convert using Pipes

I'm trying out im4java sample TestCase10 that deals with Pipes. https://github.com/Widen/im4java/blob/master/src/org/im4java/test/TestCase10.java public class im4Test { public static void main(String[] args) throws Exception { …
neon
  • 462
  • 6
  • 17
0
votes
0 answers

org.im4java.core.CommandException: java.lang.NullPointerException

m trying to compare two images located under my OS machine. I have ImageMagick running on my os machine. and i m using this method: public boolean compareImages (String expectedScreenShot, String capturedScreenShot, String pdiffCompare) { //…
Youssef
  • 41
  • 1
  • 4
0
votes
1 answer

How to compare images of different sizes using im4java

i have two images I-1 and I-2, i was able to compare these two images using im4java successfully. However now I-1 and I-2 has different size and therefore when i try to compare these two images it do not compare them and gives message ex:…
Pawan
  • 153
  • 2
  • 3
  • 15
0
votes
1 answer

Error in im4java, Cannot run program "convert": error=2, No such file or directory

I added gradle dependency for im4java 1.4.0. And trying to run the application in my linux system. Here's the Code public static void main(String[] args) throws Exception { // TODO Auto-generated method stub IMOperation op = new…
uttam
  • 435
  • 9
  • 24
0
votes
1 answer

Diff two images with im4java and give the number of different pixels as result

I have two images which I want to compare with the ImageMagick Java wrapper 'im4java'. As far I have this piece of code: boolean compare (String picture1, String picture2) { boolean pdfsEqual; IMOperation imOperation = new IMOperation(); …
Arthur Eirich
  • 3,368
  • 9
  • 31
  • 63
0
votes
1 answer

Im4Java (ImageMagick) convert 8 bit png to 24 bit png

I need to convert a 8 bit png image into 24 or 32 bit png. I understand the corresponding image magic command to convert this is: convert test.png PNG24:test2.png What ImageOperation property should be used to pass PNG24 argument to convert the…
Surya
  • 236
  • 2
  • 13
0
votes
0 answers

convert.exe (ImageMagick) showing blank after converting large svg to png/pdf

While converting a large svg to pdf I am getting blank output after converting and the following error. Error in im4java org.im4java.core.commandexception return code:3 I am executing the following: convert s.svg s.pdf Environment…
Manjunath
  • 1
  • 2
0
votes
3 answers

ImageMagick with Grails

I want to use ImageMagick in my Grails application. I am using the following dependencies in BuildConfig.groovy compile('jmagick:jmagick:6.6.9') compile('org.im4java:im4java:1.2.0') however when I try and run I get this…
Programmer
  • 59
  • 2
0
votes
1 answer

Im4Java - How to make transparent PNG based watermark in corner sized proportionally

I'm trying to create transparent sized proportionally watermark. I've written something like that for beginning. How to make watermark resized proportionally and position it with margins? IMOperation op = new IMOperation(); …