Unable to use Trim function

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 1
Joined: 2020-01-13T09:40:11-07:00
Authentication code: 1152

Unable to use Trim function

Post by abayputra2000 »


Recently I have installed ImageMagick-7.0.8-Q16 and since then am not able to remove the white space on the image. Below is the error that i get when trying to do it.

Error resizing image org.im4java.core.CommandException: org.im4java.core.CommandException: magick: no images found for operation `-trim' at CLI arg 3 @ error/operation.c/CLIOption/5262.
at org.im4java.core.ImageCommand.run(ImageCommand.java:215)

Below is the java code that i use.

IMOperation op = new IMOperation();

cmd.run(op, sourceImage,targetImage);
result = true;

Could someone able to help me out if there is anything that i can do to fix this.

User avatar
Posts: 25924
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Unable to use Trim function

Post by fmw42 »

Post a link to your input image so we can test with it.

Posts: 12556
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Unable to use Trim function

Post by snibgo »

abayputra2000 wrote:no images found for operation `-trim'
You don't read an image. IM is telling you that you can't trim an image when there is no image.
snibgo's IM pages: im.snibgo.com

Post Reply