Commit 8f8345c5 authored by thestig@chromium.org's avatar thestig@chromium.org

Add more RAW picture formats to the media galleries extension filter.

Formats from Canon, Fuji, Minolta, Olympus, Panasonic, and Sigma.

BUG=165598

Review URL: https://chromiumcodereview.appspot.com/15875004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202800 0039d316-1c4b-4281-b951-d872f2087c98
parent 48da8b5f
......@@ -15,17 +15,39 @@ namespace chrome {
namespace {
const base::FilePath::CharType* const kExtraSupportedExtensions[] = {
// RAW Picture file types.
// RAW picture file types.
// Some of which are just image/tiff.
FILE_PATH_LITERAL("3fr"), // (Hasselblad)
FILE_PATH_LITERAL("arw"), // (Sony)
FILE_PATH_LITERAL("dcr"), // (Kodak)
FILE_PATH_LITERAL("dng"), // (Adobe, Leica, Ricoh, Samsung)
FILE_PATH_LITERAL("erf"), // (Epson)
FILE_PATH_LITERAL("k25"), // (Kodak)
FILE_PATH_LITERAL("kdc"), // (Kodak)
FILE_PATH_LITERAL("mef"), // (Mamiya)
FILE_PATH_LITERAL("mos"), // (Leaf)
FILE_PATH_LITERAL("nef"), // (Nikon)
FILE_PATH_LITERAL("pef"), // (Pentax)
FILE_PATH_LITERAL("sr2"), // (Sony)
FILE_PATH_LITERAL("srf"), // (Sony)
// More RAW picture file types.
FILE_PATH_LITERAL("cr2"), // (Canon - image/x-canon-cr2)
// Note, some .crw files are just TIFFs.
FILE_PATH_LITERAL("crw"), // (Canon - image/x-canon-crw)
FILE_PATH_LITERAL("mrw"), // (Minolta - image/x-minolta-mrw)
FILE_PATH_LITERAL("orf"), // (Olympus - image/x-olympus-orf)
FILE_PATH_LITERAL("raf"), // (Fuji)
FILE_PATH_LITERAL("rw2"), // (Panasonic - image/x-panasonic-raw)
FILE_PATH_LITERAL("x3f"), // (Sigma - image/x-x3f)
// There exists many file formats all with the .raw extension. For now, only
// the following types are supported:
// - TIFF files with .raw extension - image/tiff
// - Leica / Panasonic RAW files - image/x-panasonic-raw
// - Phase One RAW files - image/x-phaseone-raw
FILE_PATH_LITERAL("raw"),
// Video files types.
FILE_PATH_LITERAL("3gp"),
FILE_PATH_LITERAL("3gpp"),
......
......@@ -240,6 +240,21 @@ static const MagicNumber kExtraMagicNumbers[] = {
MAGIC_NUMBER("application/x-shockwave-flash", "CWS")
MAGIC_NUMBER("application/x-shockwave-flash", "FWS")
MAGIC_NUMBER("video/x-flv", "FLV")
// RAW image types.
MAGIC_NUMBER("image/x-canon-cr2", "II\x2a\x00\x10\x00\x00\x00CR")
MAGIC_NUMBER("image/x-canon-crw", "II\x1a\x00\x00\x00HEAPCCDR")
MAGIC_NUMBER("image/x-minolta-mrw", "\x00MRM")
MAGIC_NUMBER("image/x-olympus-orf", "MMOR") // big-endian
MAGIC_NUMBER("image/x-olympus-orf", "IIRO") // little-endian
MAGIC_NUMBER("image/x-olympus-orf", "IIRS") // little-endian
MAGIC_NUMBER("image/x-fuji-raf", "FUJIFILMCCD-RAW ")
MAGIC_NUMBER("image/x-panasonic-raw",
"IIU\x00\x08\x00\x00\x00") // Panasonic .raw
MAGIC_NUMBER("image/x-panasonic-raw",
"IIU\x00\x18\x00\x00\x00") // Panasonic .rw2
MAGIC_NUMBER("image/x-phaseone-raw", "MMMMRaw")
MAGIC_NUMBER("image/x-x3f", "FOVb")
};
// Our HTML sniffer differs slightly from Mozilla. For example, Mozilla will
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment