mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Autodetect the EMF format
Otherwise it will be recognized only by the file extension, because libmagic returns "application/octet-stream" as mime type. Moreover, if the emf encapsulates a binary image format, it can be confused with this other format and its preview on screen fails.
This commit is contained in:
parent
2c9e019a62
commit
db9c8c6d02
@ -337,6 +337,9 @@ string guessFormatFromContents(FileName const & fn)
|
|||||||
// autodetect pdf format for graphics inclusion
|
// autodetect pdf format for graphics inclusion
|
||||||
format = "pdf6";
|
format = "pdf6";
|
||||||
|
|
||||||
|
else if (contains(str, " EMF"))
|
||||||
|
format = "emf";
|
||||||
|
|
||||||
else if (contains(str, "PNG"))
|
else if (contains(str, "PNG"))
|
||||||
format = "png";
|
format = "png";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user