Page 2 of 2

Re: newbie

Posted: 2010-06-06T08:12:42-07:00
by snibgo
We are cross-posting.

Quality numbers range from 0 to 100, but aren't percentages of anything. Jpeg is always lossy, but multiplying settings is meaningless.

Jpeg compression is designed for real-world photos, so a scan of a map may compress badly, and need a higher quality number to get acceptable quality.

The only meaningful measure of lossy compression, I believe, is by visual examination. For the most critical work (poster-size images up to 8 feet long), if I have to use lossy compression, I use Gimp to peer at the pixels.

I'll add that for complex work, which most of my work is, I use "convert" instead of "mogrify".

Re: newbie

Posted: 2010-06-06T08:54:45-07:00
by degarb
I see some of my photos have red eye. I don't like wand tools and removing red eye on each photo.

Just guessing, mogrify or other batch means to remove red eye is not possible?

Re: newbie

Posted: 2010-06-06T09:01:40-07:00
by degarb
snibgo wrote:
I'll add that for complex work, which most of my work is, I use "convert" instead of "mogrify".

I got a party to go to soon, and work next week. I will be taking more pics. Pardon my lack of doc reading, again.

I did see convert tool on mogrify page. Can it do all that mogrify does? What would be the command line?

Re: newbie

Posted: 2010-06-06T09:02:07-07:00
by snibgo
De-redding eyes isn't built into ImageMagick. A script could be written (perhaps Fred already has).

I've never had the problem, but Gimp may be the best solution. Lots of tools claim to de-red eyes, but I have no experience of them.

Re: newbie

Posted: 2010-06-06T09:18:08-07:00
by snibgo
Can it [convert] do all that mogrify does? What would be the command line?
Historically, (a) mogrify could only update images, rather than making new copies and (b) it had only a subset of "convert" options (missing: auto-level, auto-gamma, black-threshold, level, threshold, ...). However, "convert" works on only one file at a time, so I use it within loops.

The newish "-path" option reduces problem (a), but it can't create a new name for the image file.

General convert syntax is:

convert infile options outfile

eg

convert \mypictures\pict0001.jpg -modulate 100,120,100 \moresat\pict0001_sat.jpg

(EDIT: it turns out mogrify can do auto-level, auto-gamma, black-threshold, level, and threshold.)


See the documentation, eg http://www.imagemagick.org/script/convert.php

Re: newbie

Posted: 2010-06-07T17:21:53-07:00
by anthony
snibgo wrote:Historically, (a) mogrify could only update images, rather than making new copies and (b) it had only a subset of "convert" options (missing: auto-level, auto-gamma, black-threshold, level, threshold, ...). However, "convert" works on only one file at a time, so I use it within loops.
Almost but not quite true...

Morgrify is designed to update existing images (as you said). The image is read in modified, then written out to the same image (that makes it DANGERIOUS). It can however save to a file with a different file format (-format option - different to that of convert) or to the same filename in a different directory.

Yes it is also limited to a sub-set of convert operators, specifically only to operators that are designed to work on each image in individually. As such things like -border and -crop (not tile crop) -distort works, but -composite and -fx does not.

It also means multiple images can not be worked on (though you can still overlay (compose) a second image over or under another by using -draw.

See Mogrify Summary
http://www.imagemagick.org/Usage/basics/#mogrify


Convert uses the exact same operations as mogrify (it truely does, using the same code!) but also allos the use of all the other operators that work on image lists as a whole. That is operators like -composite, -fx, -flatten, which destroys and replaces the image list with the resulting merged image. also the use of parenthesis and list ordering operators like -clone.

Where you are wrong however is that convert is designed to only handle ONE IMAGE.
It can deal with multiple images. It can read in as many images as you like, and you and use the -write operator to write out as many images as you like to any file name or format, or even into an internal image register (known as MPC: which you can later read from).

For example in stead of
convert rose: -flip rose_flip.gif
convert granite: -negate dark_granite.gif

you could do this in one command...

Code: Select all

     convert rose:  -flip   -write rose_flip.gif   +delete \
                 granite:  -negate  dark_granite.gif
Note the use of +delete to remove the image after writing it to a file.

IM provides lots of filetypes to read/save to beyond the normal 'image file formats'. from 'internal' MPC: to opening 'display' windows, already running 'X' windows (like a Xterminal window), and even different file descriptors (for advanced shell scripting pipelines).

Even I am still learning them for example I was finally able to demonstrate InLine: images. that is encoding small images so the image itself can be read from the command line rather than an external file or piepline

Re: newbie

Posted: 2010-06-07T18:35:30-07:00
by snibgo
I should have been clearer. I meant that a single convert can't do the same operation to a thousand files, so I put it in a loop for that. Of course, a single convert can readily operate on a number of inputs, and create a number of outputs.