241-magic-add-canon.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. Author: Adam Buchbinder <adam.buchbinder@gmail.com>
  2. Description: Adding new magics for Canon CRW and CR2 files (Closes: #516054).
  3. diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images
  4. --- file.orig/magic/Magdir/images 2010-07-13 18:47:51.670671838 +0200
  5. +++ file/magic/Magdir/images 2010-07-13 18:48:12.525672541 +0200
  6. @@ -63,6 +63,25 @@
  7. 0 string IIN1 NIFF image data
  8. !:mime image/x-niff
  9. +# Canon RAW version 1 (CRW) files are a type of Canon Image File Format
  10. +# (CIFF) file. These are apparently all little-endian.
  11. +# From: Adam Buchbinder <adam.buchbinder@gmail.com>
  12. +# URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
  13. +0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data
  14. +!:mime image/x-canon-crw
  15. +>16 leshort x \b, version %d.
  16. +>14 leshort x \b%d
  17. +
  18. +# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
  19. +# number. Put this above the TIFF test to make sure we detect them.
  20. +# These are apparently all little-endian.
  21. +# From: Adam Buchbinder <adam.buchbinder@gmail.com>
  22. +# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2
  23. +0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data
  24. +!:mime image/x-canon-cr2
  25. +>10 byte x \b, version %d.
  26. +>11 byte x \b%d
  27. +
  28. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  29. # The second word of TIFF files is the TIFF version number, 42, which has
  30. # never changed. The TIFF specification recommends testing for it.