operations order and resize

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?".
Locked
ridera

operations order and resize

Post by ridera »

Seems like it would be best to apply filters, etc AFTER resizing rather then before.

Yet, I can't something like this to work

Code: Select all

exec("$convert $tmp_fp_file -colors 256 -quality 75 -resize 800x900 -filter Mitchell -unsharp 2x1.0  $png_saved_fpfile");
If I put filter and/or unsharp after resize, it fails. If they are before resize it works.

Thanks

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

The -filter option is a setting not an operator. It is required before the -resize option.

ridera

Post by ridera »

I assumed that filter was a transform [operator] that processed the image, just like unsharp.

Would be nice it the documentation stated the type for each command.

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Would be nice it the documentation stated the type for each command
.

We agree-- oh wait we've already done that, RTFM: http://www.imagemagick.org/script/comma ... hp#setting

ridera

Post by ridera »

Would be helpful if the category was shown on the command line, i.e.,

–colors value [setting]

Incidently, resize is missing from the list.

On my system, -unsharp does not work following -resize.

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Would be helpful if the category was shown on the command line, i.e.,
Agreed. Grab the source to the command line option web page, make your edits, and post the updates here and we will get it into the main ImageMagick web site. ImageMagick is a community project and depends on users like yourself to improve the project.
On my system, -unsharp does not work following -resize.
It works, you may not be using the right radius, sigma, amount, and threshold to give you a desired result. Try resizing and then resize followed by -unsharp. Compare the two images with the compare program and the difference image highlights which pixels were modified by the -unsharp option.

ridera

Post by ridera »

I'll add the the categories in a week or two; right now I'm heavy into a project.


The reason I believe it doesn't work is that I can simply copy
"-unsharp 2x1.0" [without quotes]

and move it back and forth from before resize and after resize.

It always works before and not after -resize 980x900.

Locked