Guillaume Bonillo a écrit :
Paul Surgeon a écrit :
On Monday 07 May 2007 11:37, Guillaume Bonillo wrote:

I am new to scheme scripting.
What i want to do is open pictures from a directory and apply a very
simple macro.

I can do it manually with the following steps :
    - open image "the_image.jpg".
    - save as .... the_image_with_thumbnail.jpg
    - choose options : q = 0.85 , progressive, and default other options.
    - check the option : save thumbnail.
    - Click OK.
    - close image.

Using a bash script or DOS batch file with imagemagick is a better and easier solution.

Below is a bash script that I use to create thumbnails of photos from my digital camera. You can pass the jpg quality parameter to convert - I used the default which is 75% I think. The options are in the docs.



echo "Converting ..."

if [ ! -d "resized-1024x768" ]
  mkdir resized-1024x768

if [ ! -d "resized-256x192" ]
  mkdir resized-256x192

# Loop through all jpg files in current folder
# ============================================
for i in *.jpg
  FileName_Stripped=`echo $i | cut -d. -f1`

  if [ ! -e "resized-1024x768/$FileName_Stripped-1024x768.jpg" ]
    echo "Converting $i to $FileName_Stripped-1024x768.jpg"
convert -resize 1024x768 $i "resized-1024x768/$FileName_Stripped-1024x768.jpg"

  if [ ! -e "resized-256x192/$FileName_Stripped-256x192.jpg" ]
    echo "Converting $i to $FileName_Stripped-256x192.jpg"
convert -resize 256x192 $i "resized-256x192/$FileName_Stripped-256x192.jpg"

echo "Done"

Thank you very much for pointing this tool to me.
However ...
I can't find in imagemagick the ability to save thumbnail as EXIF data in the jpeg, and not in a different picture.

Ok, so if someone want to write Exif thumbnail to jpeg i've done this with imagemagik and exiftools to write thumbnail generated by imagemagik... Maybe there's a better way to do this but this tools works just as expected and there's no loss of other exif info.

But if someone ever got a scheme script to do that through GIMP ... i'am interested

Thanks list !
Gimp-user mailing list

Reply via email to