Created
November 17, 2012 22:23
-
-
Save flavioamieiro/4100745 to your computer and use it in GitHub Desktop.
Extrair JPEG do header de um arquivo raw da Canon (CR2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name '*.CR2' -print0 | while read -r -d '' FILE | |
do | |
BASENAME=$(basename -s ".CR2" "$FILE") | |
exiftool -b -previewImage -ext .CR2 -w .JPG "$FILE" | |
exiftool -tagsFromFile "$FILE" "$BASENAME".JPG | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
O formato de imagens Raw da Canon inclui no header um JPEG do mesmo tamanho da imagem original. Esse script procura todos os arquivos com a extensão CR2 a partir do diretório atual, extrai o JPEG do header, e copia o resto do cabeçalho pro JPEG.