Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/org/im4java/core/IMOps.java
Original file line number Diff line number Diff line change
Expand Up @@ -11911,6 +11911,30 @@ public IMOps resize(Integer width) {
return this;
}

//////////////////////////////////////////////////////////////////////////////

/**
Add option -resize % to the ImageMagick commandline
(see the documentation of ImageMagick for details).
*/

public IMOps percentageResize(Integer width) {

String oper; // only used in some methods
StringBuffer buf = new StringBuffer(); // local buffer for option-args
iCmdArgs.add("-resize");

if (width != null) {
buf.append(width.toString());
buf.append("%");
}
if (buf.length()>0) {
iCmdArgs.add(buf.toString());
}
return this;
}


//////////////////////////////////////////////////////////////////////////////

/**
Expand Down