exiv2

Is there anyway (commandline tools) to calculate MD5 hash for .NEF (also .CR2, .TIFF) regardless any metadata?

99封情书 提交于 2021-02-18 12:46:16
问题 Is there anyway (commandline tools) to calculate MD5 hash for .NEF (also .CR2, .TIFF) regardless any metadata, e.g. EXIF, IPTC, XMP and so on? The MD5 hash should be same once we update any metadata inside the image file. I searched for a while, the closest solution is: exiftool test.nef -all= -o - -m | md5 but 'exiftool -all=' still keeps a set of EXIF tags in the output file. The MD5 hash can be changed if I update remaining tags. 回答1: ImageMagick has a method for doing exactly this. It is

Is there anyway (commandline tools) to calculate MD5 hash for .NEF (also .CR2, .TIFF) regardless any metadata?

一笑奈何 提交于 2021-02-18 12:46:14
问题 Is there anyway (commandline tools) to calculate MD5 hash for .NEF (also .CR2, .TIFF) regardless any metadata, e.g. EXIF, IPTC, XMP and so on? The MD5 hash should be same once we update any metadata inside the image file. I searched for a while, the closest solution is: exiftool test.nef -all= -o - -m | md5 but 'exiftool -all=' still keeps a set of EXIF tags in the output file. The MD5 hash can be changed if I update remaining tags. 回答1: ImageMagick has a method for doing exactly this. It is

巧用 bash 变量的正则匹配功能,实现海量文件名的格式化

浪尽此生 提交于 2020-03-07 00:40:26
写在前面 疫情期间整理 Synology 里存储了 10多年的相片 ,这些相片穿越了功能手机到智能手机的年代。 不少照片非常有年代感,文件名同样也有年代感。五花八门…… 最初用 exiv2 来读取照片的源信息,发现有些老照片没有源信息、新格式的照片读不到源信息。 然后用 exiftool 来识别了新照片的源信息和部分视频的源信息。 最后甚至还启用了 SQLite 数据库存储文件的源信息。 化繁为简 今日扫描了一遍文件系统,结合 SQLite 里的数据分析,发现仍有大量 照片/视频 的拍摄时间无法确定: 部分手机拍摄的全景照片 部分第三方拍照软件 从第三方软件另存的照片 部分视频文件 很久很久以前的照片 这些都是最美好的记忆,我要保存好它。所以我决定写个脚本去识别那个“乌七八糟”不规则的文件名,哪怕会有些不需要的照片也被整理进来。 总比把珍贵的照片现在就丢失了的好,未来还可以用图片识别去分类、去重,最终无法用程序处理的再人肉处理。想想都完美~   好,开始动手敲: #!/bin/bash # Rename.sh : Foramt the file name by rules readonly iLog="./Rename.log" # 扫描日志 readonly eLog="./Rename.err" readonly debug=false readonly stdName="(^

强大的 exiftool 助 Synology 照片整理一臂之力

↘锁芯ラ 提交于 2020-03-03 21:18:04
上次整理照片: 强大的 exiv2 助 Synology 照片整理一臂之力 由于 exiv2 不支持 heic 图片和视频文件,联系 Synology 推荐了 exiftool 。 安装 exiftool # 先安装 Perl 套件,然后开启 ssh-server wget -o ~admin/www/Image-ExifTool-11.89.tar.gz https://exiftool.org/Image-ExifTool-11.89.tar.gz tar -C ~admin/www -zxvf ~admin/www/Image-ExifTool-11.89.tar.gz ln -s ~admin/www/Image-ExifTool-11.89/exiftool /usr/local/bin/exiftool exiftool -ver 体验 exiftool exiftool 果然 很强大 ,自带了 图片改名功能 、而且支持非常丰富的媒体类型。 # 按照片拍摄年份,存入指定目录 exiftool '-Directory<CreateDate' -d "~/photo/%Y" ./*.{jpg,cr2,heic} # 文件按格式改名 exiftool '-filename<CreateDate' -d "%Y/%Y%m%d-%H%M%S.%%le" ./*.{jpg,heic

Use exiv2 or imagemagick to remove EXIF data from stdin and output to stdout

淺唱寂寞╮ 提交于 2019-12-22 12:22:33
问题 How can I pipe an image into exiv2 or imagemagick, strip the EXIF tag, and pipe it out to stdout for more manipulation? I'm hoping for something like: exiv2 rm - - | md5sum which would output an image supplied via stdin and calcualte its md5sum. Alternatively, is there a faster way to do this? 回答1: Using exiv2 I was not able to find a way to get exiv2 to output to stdout -- it only wants to overwrite the existing file. You could use a small bash script to make a temporary file and get the md5

GCC Compiles fine but Solaris Compiler doesn't?

那年仲夏 提交于 2019-12-12 03:02:54
问题 source: svn checkout svn://dev.exiv2.org/svn/trunk (rev: 3019) My platform: Fedora 17 64-bit The following command works: ./configure CXX=/opt/oracle/solarisstudio12.3/bin/CC \ CC=/opt/oracle/solarisstudio12.3/bin/cc CXXFLAGS="-v -library=stlport4" But when I do make, I get the error: libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -v -library=stlport4 - xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -funsigned- char -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML

Is XMP metadata supported in PNG images?

情到浓时终转凉″ 提交于 2019-12-10 14:17:13
问题 I've been trying to understand how XMP metadata worked on PNG files for the last few hours but couldn't quite wrap my head around it. If I create a PNG image with Photoshop, save it and open the File Info dialog (File > File Info or Ctrl+Alt+Shift+I), I can see some XMP properties like CreateDate , CreatorTool or ModifyDate . Now if I try to open the file with exiv2 and read the metadata it seems to not find anything: auto image = Exiv2::ImageFactory::open(imagePath); image->readMetadata();