hrev44356 adds 2 changesets to branch 'master' old head: 8959a4e0c37873f56f44ea1743902de0ec0e44d4 new head: ca741c4835e9099d8e160daa6bd1fcca5499a0dd ---------------------------------------------------------------------------- 9be0c9b: Improve SVG image identification (close #8653) * add a sniff rule * until we have an image translator for SVG, and since Web+ is not included by default in Haiku images, made Web+ preferred app for SVG images. Note that for compressed SVGZ (*.svgz), the sniff rule will still fail miserably. Our sniffer will need decompression support before being able to do that... ca741c4: Merge branch 'master' of ssh://git.haiku-os.org/haiku [ Philippe Houdoin <philippe.houdoin@xxxxxxxxx> ] ---------------------------------------------------------------------------- 1 file changed, 8 insertions(+), 1 deletion(-) src/data/beos_mime/image/svg+xml | 9 ++++++++- ############################################################################ Commit: 9be0c9b03c9e25270699d59a363355cea083f63b URL: http://cgit.haiku-os.org/haiku/commit/?id=9be0c9b Author: Philippe Houdoin <philippe.houdoin@xxxxxxxxx> Date: Thu Jul 19 21:24:52 2012 UTC Ticket: https://dev.haiku-os.org/ticket/8653 Improve SVG image identification (close #8653) * add a sniff rule * until we have an image translator for SVG, and since Web+ is not included by default in Haiku images, made Web+ preferred app for SVG images. Note that for compressed SVGZ (*.svgz), the sniff rule will still fail miserably. Our sniffer will need decompression support before being able to do that... ---------------------------------------------------------------------------- diff --git a/src/data/beos_mime/image/svg+xml b/src/data/beos_mime/image/svg+xml index 88ef6db..94532c1 100644 --- a/src/data/beos_mime/image/svg+xml +++ b/src/data/beos_mime/image/svg+xml @@ -5,8 +5,15 @@ resource(1, "META:TYPE") "image/svg+xml"; resource(2, "META:S:DESC") #'MSDC' "SVG image"; -resource(3, "META:EXTENS") message(234) { +resource(3, "META:SNIFF_RULE") #'CSTR' array { + "0.60 [0:511] ( -i \"<SVG\" | \"<!DOCTYPE SVG\" )" +}; + +resource(4, "META:PREF_APP") #'MSIG' "application/x-vnd.Haiku-WebPositive"; + +resource(5, "META:EXTENS") message(234) { "extensions" = "svg", "extensions" = "svgz", "type" = "image/svg+xml" }; + ############################################################################ Revision: hrev44356 Commit: ca741c4835e9099d8e160daa6bd1fcca5499a0dd URL: http://cgit.haiku-os.org/haiku/commit/?id=ca741c4 Author: Philippe Houdoin <philippe.houdoin@xxxxxxxxx> Date: Thu Jul 19 21:48:23 2012 UTC Merge branch 'master' of ssh://git.haiku-os.org/haiku ----------------------------------------------------------------------------