Sadly, again, there seems to be nothing written anywhere about what it does, how it can be used. Only technical stuff about how it stores things and some stuff that makes no sense to someone who just wants to write a simple script to get a job done.
And using the extension .miff in my script locked up my computer for a whole night with the hard drive running.
So, this morning I converted a file to miff and opened the file to try to understand it. Then I converted ten files and tried different uses of the .miff extension.
That led to the discovery that a single .miff can contain all the exif information stored not only in an image, but as you told me, in a collection of images.
Which led to reasoning that I should direct a convert command not to something like *.miff, but to something like working-file.miff
That led me to try performing an operation on a single image .miff and converting it back to a viewable format. So I tried converting a multi image .miff and setting a $file.jpg type output.
And there was the result. the .miff spat out each file that had been stored inside it, as single jpeg files, processed and renamed and in an output folder, just as I wanted them.
Now, the big question. Why is there not some sort of simple description of this process, or even a simple tutorial about how someone can use the .miff to achieve 'stuff'?
On another point, especially if the Original Poster decides to poke around in this thread again, the more or less 'generic' settings I am using are working on everything from high resolution images down to 100kb thumbnails, but work best on stuff over 500kb. Those settings are even working well on 3D text generated by IM convert command.
This I think was what the OP was asking about. Because there is really no 'best' settign for unsharp, I believe like me he was looking for something more or less generic to get an improvement across a batch of files.
What his question did for me though, was saved me about $1000 that I was going to spend on an SLR digital camera. Because all my long distance zoom shots are now allowing me to see detail over a distance of several nautical miles at 12x zoom.
So once again IM comes to the rescue and I've learned a heap more about my cameras.
Next step is to incorporate my HALD-CLUT enhancements somewhere before the unsharp command
Here's how the script looks so far using .miff in the middle. And you are right - it does seem to cut the processing time, but I will have to do timed tests to see just how much. I'm using an old E-350 processor at only 1.6Ghz and 4GB RAM, so nothing happens quickly.
Code: Select all
!#/bin/bash
# RossDV8's unsharp script for ImageMagick under Linux
# This strips the profile from every jpeg in a folder then applies basic unsharp
# NOTE - DO This ONLY after all other corrections including HALD CLUT have been done
# RENAME all JPG to jpg
#!/bin/sh
# lowerit-this bit is scrounged off the net - but it works well
# convert all file names in the current directory to lower case
# only operates on plain files--does not change the name of directories
# will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x | tr '[A-Z]' '[a-z]'`
if [ $lc != $x ]; then
mv $x $lc
fi
done
#From here it is basically IM
# Strip ICC profiles and store in a miff file
convert *.jpg +profile "*" noicc.miff
# Apply unsharp mask to all jpegs in the miff then convert them back to jpegs
convert noicc.miff -unsharp 10x4+1+0 'unsharp'$file.jpg
# Make output folder
mkdir UnSharped
# move unsharped files to output
mv unsharp* UnSharped
# Clean Up
rm noicc*