BaroqueW

BaroqueW

and his sidekick nikkitaa

BaroqueW RSS Feed
 
 
 
 

Posts tagged photo

iPhoto et tags EXIF

Adapté d’un script par Andrew Turner, ce script Applescript permet d’ajouter des tags Exif (commentaires, titre, date, etc.) à vos photos à partir des méta-données que vous aurez saisies dans iPhoto. Pour ce faire, sélectionnez vos photos dans iPhoto (pas des albums mais bien des photos) et exécutez ce script. Voir plus bas pour quelques commentaires et le script à télécharger.

– This applescript will set the exif keywords, name, and comments of all selected iPhoto
–   images using the information current in iPhoto.

– Author: Andrew Turner (http://highearthorbit.com)
– Editor: BaroqueW (http://www.baroquew.net)

property copyright : ""
property URL : ""
property exifToolOriginal : "_original"

– True retains copyright, False means Public Domain
property Copyrighted : "False"

tell application "iPhoto"
        activate
        try
                copy (my selected_images()) to these_images
                if these_images is false or (the count of these_images) is 0 then ¬
                        error "Please select a single image."

                set counter to 0

                repeat with i from 1 to the count of these_images
                        set the keywordslist to ""
                        set this_photo to item i of these_images
                        tell this_photo
                                set the image_file to the image path
                                set the image_title to the title
                                set the image_filename to the image filename
                                set the image_comment to the comment
                                set the assigned_keywords to the name of keywords
                                set the image_date to the date
                                set date_step1 to do shell script "echo " & image_date & " | sed ’s/,//g’ | sed ’s/\\([A-Z][a-z][a-z]\\)\\([a-z]\\)*/\\1/g’ | sed ’s/[0-9][0-9]\\([0-9][0-9]\\)/\\1/’"
                                set date_step2 to do shell script "date -j -f ‘%a %b %d %y %I:%M:%S %p’ " & quoted form of date_step1 & " ‘+%y:%m:%d %H:%M:%S’  | sed ’s/^0/200/’ | sed ’s/^9/199/’"
                        end tell
                        repeat with j from 1 to the count of assigned_keywords
                                set the keywordslist to keywordslist & " -keywords+=" & item j of assigned_keywords
                        end repeat
                        set the command to "exiftool -m -PL -title=\"" & image_title & ¬
                                "\" " & keywordslist & ¬
                                " " & " -comment=’" & image_comment & ¬
                                "’ " & " -CreateDate=’" & date_step2 & ¬
                                "’ " & " -DateTimeOriginal=’" & date_step2 & ¬
                                "’ " & " -Copyright=’" & copyright & ¬
                                "’ " & " -CopyrightNotice=’" & copyright & ¬
                                "’ " & " -Rights=’" & copyright & ¬
                                "’ " & " -Marked=’" & Copyrighted & ¬
                                "’ " & "\"" & image_file & "\""
                        set output to do shell script command
                        do shell script "rm \"" & image_file & "\"" & exifToolOriginal
                        set counter to counter + 1
                end repeat
                display dialog "Exif writing complete for " & (counter as string) & " files."
        on error error_message number error_number
                if the error_number is not -128 then
                        display dialog error_message & " Exif writing complete for " & (counter as string) & " files." buttons {"Cancel"} default button 1
                end if
        end try
end tell

on selected_images()
        tell application "iPhoto"
                try
                        – get selection
                        set these_items to the selection
                        – check for single album selected
                        if the class of item 1 of these_items is album then error
                        – return the list of selected photos
                        return these_items
                on error
                        return false
                end try
        end tell
end selected_images

J’ai amélioré le script pour le rendre compatible avec les inévitables accents et apostrophes de la langue française. J’ai aussi ajouté le support pour les dates (cf. les expressions régulières et ’sed’ plus haut, lignes 33 et 34) – à noter que mes locales sont en anglais sur MacOSX donc il y aura peut-être des adaptations à faire pour retomber sur vos pieds (notamment l’usage de AM/PM serait surprenant avec des locales françaises, voir ligne 34). Petite cerise sur le gâteau, le programme retourne le nombre de fichiers modifiés (ligne 53) et éventuellement le fichier qui a causé une erreur en cas de plantage (ligne 56).

Attention : par choix personnel, j’ai décidé d’ignorer les erreurs mineures (modificateur ‘-m’ dans la commande ‘exiftool’ à la ligne 39). Il est recommandé d’essayer le script sans ce modificateur et de le rajouter si vous rencontrez des problèmes et que vous voulez tenter votre chance.

Vous pouvez télécharger le script ici : Set Exif Data

  • Share/Save/Bookmark
Category: Articles en français, Tech >> Computer | Leave a comment

Image tools for MacOSX

Here is a brief review of a few MacOSX picture apps I have had in the pipeline for a while.

  • MacOSaiX MacOSaiX: MacOSaiX’s objective is to create mosaics as you often see on commercials: multiple smaller images are used to recreate a bigger one. You can set up this freeware to change the final “resolution” of the mosaic, 30×30 is a minimum for a pic you took with your digital camera but don’t hesitate to go up to 50×50 if you are converting a picture rich in detail. You can use any images you have on your hard drive or even fetch images from Google Images by inputing a few keywords. To use your iPhoto library, use that path: /Users/YourName/Pictures/iPhoto Library/Originals/ or just /Users/YourName/Pictures/. For those out there who care about details, you can even choose each tile (the smaller images) one by one. And remember, it is free! Here is [an example. The garden pic is made up of 45×45 tiles, starting from a 600×449 picture; my PowerBook computed around one hour to achieve that result. A service of mosaic generation similar to this one and using pictures from Flickr is available online at Image Mosaic Generator.
  • Double Take DoubleTake: this shareware ($16.95) generates panoramas from sets of pictures taken from a digital camera, in the case your camera does not have that functionality. This software decides itself what pics to use, where they join, how to adapt brightness and contrast. It can also apply the right anti-distorsion scheme to your pictures. Once again, you can take everything under control yourself: the position of the pictures, their contrast, the overall deformation and so on. Here is an example, with a panoramic view of the Bratislava Castle in Slovakia.
  • iPhoto iPhoto: it is the official Apple picture tool à la Picasa. iPhoto is part of the iLife suite so I guess there is no need to present it, you will probably prefer to have a look at some of its plugins:
  • Plugins for iPhoto: iPhotoToGallery et Picasa Web Tools :
    • iPhotoToGalleryThe first one enables you to link iPhoto to one or more galleries like this one. It also eases the exportation of your pics to your online gallery. From the local interface, you can create new folders, resize your pics before uploading, choose the informations to export etc.
    • Picasa Web Tools The second one allows you to procede to the same kind of operations for the Picasa suite, the Google solution for pictures management and hosting.




  • Image Shackle Finally, Image Schakle is the tiny but efficient widget I shrinked all the images of that post with. Just drag and drop a picture on this free widget, select the output size and you’re done!
  • Share/Save/Bookmark
Category: Articles in English, Tech >> Computer | Leave a comment

Logiciels d’images pour MacOSX

Aujourd’hui, petite revue de quelques utilitaires pour photos sur MacOSX.

  • MacOSaiX MacOSaiX : MacOSaiX permet de réaliser des mosaïques comme on en voit souvent dans les publicités : plusieurs petites images en forment une plus grande. Vous pouvez paramétrer le logiciel pour changer la “résolution” finale de la mosaïque, je vous recommande 30 par 30 (à adapter selon l’allure de votre photo d’origine, une photo riche demandera plus de “résolution”) pour une photo originale de taille 1440×1080. Vous pouvez utiliser des images de n’importe quel dossier de votre ordinateur pour générer la grande image ou bien vous pouvez spécifier des mots clés à utiliser sur Google Images (vous pouvez même mixer les deux). Pour utiliser votre librairie iPhoto, entrez ce chemin : /Users/YourName/Pictures/iPhoto Library/Originals/ ou plus simplement /Users/YourName/Pictures/. Pour les perfectionnistes, vous pouvez choisir chaque tuile (petit élément de l’image d’ensemble) à la main. Cerise sur le gâteau, c’est gratuit ! Voilà un exemple de ce que ça donne. La photo du jardin a été traitée en 45×45, avec une image de 600×449 au départ, en laissant tourner un peu plus d’une heure. Un service équivalent de création de mosaïque à partir d’images de Flickr est disponible en ligne et gratuitement sur Image Mosaic Generator.
  • Double Take DoubleTake : cet outil permet pour $16,95 de créer des panoramas à partir de plusieurs photos pour ceux qui ne disposent pas de cette fonction sur leur appareil photo numérique. Le logiciel se charge tout seul de recoller les photos et d’adapter la luminosité et la déformation à appliquer à chaque photo (à cause de la distorsion des lentilles). Là encore vous pouvez tout régler à la main : luminosité, contraste, déformation, position. Ici, un exemple de panorama : le palais de Bratislava en Slovaquie.
  • iPhoto iPhoto : c’est l’outil de gestion de photos à la Picasa de la suite iLife d’Apple, pas la peine de le décrire. Regardez plutôt du côté des plugins ci-dessous :
  • Plugins pour iPhoto : iPhotoToGallery et Picasa Web Tools :
    • iPhotoToGallery Le premier permet de lier iPhoto à une ou plusieurs galeries comme celle-ci et de faciliter l’exportation de vos photos sur votre galerie en ligne. Depuis l’interface locale, vous pouvez créer des nouveaux dossiers, redimensionner vos images avant de les envoyer, choisir quelles informations exporter etc.
    • Picasa Web Tools Le second permet de réaliser la même chose avec Picasa, la solution gestion+hébergement de photos de Google.




  • Image Shackle Enfin, Image Schakle qui est le widget que j’ai pris pour redimensionner les images de ce post ! Déposer une image sur le widget, choisissez la résolution de sortie et voilà, le tour est joué ! En plus, Image Shackle est lui aussi gratuit.
  • Share/Save/Bookmark
Category: Articles en français, Tech >> Computer | Leave a comment

Status

  • BaroqueW ecoute desproges dans les fjords
    1 day ago
  • BaroqueW : it is in fact NOT funny to point people in the wrong direction when they're lost
    2 days ago
  • BaroqueW : iphone 3gs, July 31st in Sweden - according to Telia
    3 days ago
  • BaroqueW had a quick look at the book keeping of the holidays... gloups
    4 days ago

Popular posts

My Social Networks

DandyID 43 Things Clipmarks coComment Dailymotion Delicious deviantART Digg Diigo Facebook Flickr Get Satisfaction Guitar Hero HelloTxt Hulu ICQ Imdb Imeem Kiva last.fm Linkedin Netvibes orkut PeoplePond Picasa Plaxo PostCrossing RockBand Scribd Stumbleupon Tagged TripAdvisor Twitpic Twitter Xbox LIVE YouTube

Expand the experience

Blogroll

Internet Map

Meta