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
5
votes
1 answer

Does Img4j place the text as per the resolution?

I come across this Does Im4Java support adding text to images while specifying font, font-size, and color? Does im4j places the text as per the resolution of the image? Ex: 16 pts of a font is smaller in high resolution where as it is big in low…
testjava dev
  • 145
  • 5
5
votes
1 answer

How to pass multiple image input-streams to im4java?

I am constructing a PSD with multiple layers using imagemagick. That works for me using the CLI command convert 1.png 1.png 2.png test.psd. (the extra 1.png is there because the first layer of a PSD is the flattened result of all layers) I want to…
the21st
  • 1,012
  • 1
  • 10
  • 24
5
votes
0 answers

Resizing GIF loses animation

I'm using GraphicsMagick (1.3.16) and im4java (1.4.0) to create thumbnails of GIFs. At the command line I can do something like: convert original.gif -coalesce -resize 100x100 +profile * thumb.gif and the thumbnail is created successfully,…
Ariana A.
  • 61
  • 2
4
votes
3 answers

org.im4java.core.CommandException: magick: no images found for operation

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

im4java read an image

I tried to read an image in Java with the library im4java: File file = new File("img\\test.jpg"); Info imageInfo = new Info(file.getPath(),true); The problem is that Info() don´t recognize the image. An exception is called: Exception in thread…
Helia
  • 67
  • 12
3
votes
3 answers

im4java throws FileNotFoundException error

I need to use ImageMagic in my java project. I already installed ImageMagic-7.0.3 on Windows 10 (command line works fine) Then, i added dependency to im4java in maven file. When i try to do some action like: public static void main(String[] args)…
Konrad Dziurdź
  • 717
  • 3
  • 8
  • 15
3
votes
1 answer

Image comparison using im4java

public class im4jav extends test{ public static void main(String[] args) throws IOException { WebDriver driver = new FirefoxDriver(); driver.get("https://www.google.co.in/?gfe_rd=cr&ei=fkKzVqasB8yl8wefrraoCg&gws_rd=ssl"); File scrFile…
Suraj Prasad
  • 241
  • 3
  • 24
3
votes
2 answers

JPEG file streamed thru ImageMagick is not the same size as the original file

I'm using ImageMagick to do some image manipulation. I'm trying to stream a file from a service that returns an input stream and do image manipulation on the fly without letting the file hit the HDD. When I convert the input stream to file using…
Classified
  • 5,759
  • 18
  • 68
  • 99
3
votes
2 answers

imagick convert png to jpg in java with im4java

I need to convert from PNG to JPG. However, iMagick adds a black background to it. I saw this question which is for PHP, and tried to write the same for java like this: // create the a jpg image ConvertCmd cmd = new ConvertCmd(); // create the…
Dejell
  • 13,947
  • 40
  • 146
  • 229
2
votes
1 answer

org.im4java.core.CommandException: return code: 137

Now,I am using im4java and imageMagick to deal with pictures. Recently,it always appears org.im4java.core.CommandException: return code: 137 At the same time the Tomcat7.0 that is my Application Server will crash. Of course,my program run in…
StackNow
  • 29
  • 5
2
votes
1 answer

unable to execute compare command of ImageMagick from Java im4java

I am using Eclipse JUNO JDK 7 im4java-1.4.0 When I execute the Java progrm I am facing the below problem org.im4java.core.CommandException: org.im4java.core.CommandException: compare.exe My Code is: public static void main(String[] args) { …
user2118784
  • 442
  • 1
  • 6
  • 18
2
votes
2 answers

-define and -limit in Im4java

I need to know how to translate a imagemagick commandline-command into java im4java code commandline: convert -limit memory 40GiB -define registry:temporary-path=F:\\imageMagick Row_1.png Row_2.png -append Row_12.png" I know how to use convert and…
Selphiron
  • 897
  • 1
  • 12
  • 30
2
votes
3 answers

get image size with graphicsmagick

for one of my project i am using im4java library and send command through it to graphicsmagick. to get image size : identify -format \"%w,%h,\" test.png i can get size properly till the following result. this time stderr changes the…
kurt_vonnegut
  • 190
  • 3
  • 14
2
votes
1 answer

Does Im4Java support adding text to images while specifying font, font-size, and color?

My question is straight forward. I have recently started using Im4Java, an imagemagick java wrapper, and was wondering if the API supports adding text to images. If it does, does it allow the specification of font-size, font, and color. Is there a…
antihero989
  • 486
  • 1
  • 10
  • 32
2
votes
1 answer

Create a Dicom image

I am currently working with a DICOM project in java. I am calculating the dicom values such as depth, off-axis ratio, width and height. I want to create a sample image with the calculated width and height. I should be a gray scale image, with…
1
2 3 4 5