项目作者: redshiftzero

项目描述 :
Simple tool to scrub metadata from images ✨🛁
高级语言: Go
项目地址: git://github.com/redshiftzero/scrubber.git
创建时间: 2017-06-21T02:32:54Z
项目社区:https://github.com/redshiftzero/scrubber

开源协议:GNU General Public License v3.0

下载


scrubber

CircleCI

Simple CLI to remove metadata from images

Note: This is in development and should not be used by high risk users.

  1. $ scrubber -help
  2. Usage of scrubber:
  3. -clean
  4. Generate cleaned image (optional) (default true)
  5. -input string
  6. Image file to scrub metadata from (required)
  7. -json
  8. Print JSON metadata to stdout (optional)
  9. -output string
  10. Output file of cleaned image (optional)

Example

Scrubbing image metadata and printing JSON metadata

  1. $ scrubber -input=test/test.jpg -json
  2. Clean version of test/test.jpg saved in the current directory as test_clean.jpg
  3. {
  4. "Aperture": "5.66 EV (f/7.1)",
  5. "Color Space": "sRGB",
  6. "Components Configuration": "Y Cb Cr -",
  7. "Compression": "JPEG compression",
  8. "Custom Rendered": "Normal process",
  9. "Date and Time": "2010:05:28 13:35:33",
  10. "Date and Time (Digitized)": "2010:05:28 09:42:30",
  11. "Date and Time (Original)": "2010:05:28 09:42:30",
  12. "Exif Version": "Exif Version 2.21",
  13. "Exposure Bias": "0.00 EV",
  14. "Exposure Mode": "Auto exposure",
  15. "Exposure Program": "Not defined",
  16. "Exposure Time": "1/500 sec.",
  17. "F-Number": "f/7.1",
  18. "Filename": "test/test.jpg",
  19. "Flash": "Flash did not fire, compulsory flash mode",
  20. "FlashPixVersion": "FlashPix Version 1.0",
  21. "Focal Length": "300.0 mm",
  22. "Focal Plane Resolution Unit": "Inch",
  23. "Focal Plane X-Resolution": "3210.946",
  24. "Focal Plane Y-Resolution": "3230.241",
  25. "ISO Speed Ratings": "400",
  26. "Interoperability Index": "R98",
  27. "Interoperability Version": "0100",
  28. "Manufacturer": "Canon",
  29. "Metering Mode": "Pattern",
  30. "Model": "Canon EOS DIGITAL REBEL XTi",
  31. "Orientation": "Top-left",
  32. "Pixel X Dimension": "2816",
  33. "Pixel Y Dimension": "1880",
  34. "Resolution Unit": "Inch",
  35. "Scene Capture Type": "Standard",
  36. "Shutter Speed": "8.97 EV (1/500 sec.)",
  37. "Software": "Paint Shop Pro Photo 11.20",
  38. "User Comment": "",
  39. "White Balance": "Auto white balance",
  40. "X-Resolution": "72",
  41. "Y-Resolution": "72",
  42. "YCbCr Positioning": "Co-sited"
  43. }

Verifying metadata is gone in scrubbed image

  1. $ scrubber -input=test_clean.jpg -json -clean=false
  2. {
  3. "Filename": "test_clean.jpg"
  4. }

Install

Currently you need libexif installed:

  1. apt-get install libexif-dev

Or on Mac OS:

  1. brew install libexif

Then you can:

  1. go get github.com/redshiftzero/scrubber