mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Better PNG detection in guessFormatFromContents
This commit is contained in:
parent
9521834e3a
commit
43477730a4
@ -255,8 +255,12 @@ string guessFormatFromContents(FileName const & fn)
|
||||
} else if (stamp == "\377\330") {
|
||||
format = "jpg";
|
||||
|
||||
} else if (prefixIs(str, "\x89PNG")) {
|
||||
format = "png";
|
||||
|
||||
} else if (stamp == "\001\332") {
|
||||
format = "sgi";
|
||||
|
||||
} else if (prefixIs(str, binEPSStamp)) {
|
||||
format = "eps";
|
||||
|
||||
@ -319,9 +323,6 @@ string guessFormatFromContents(FileName const & fn)
|
||||
else if (contains(str, " EMF"))
|
||||
format = "emf";
|
||||
|
||||
else if (contains(str, "PNG"))
|
||||
format = "png";
|
||||
|
||||
else if (contains(str, "%!PS-Adobe")) {
|
||||
// eps or ps
|
||||
ifs >> str;
|
||||
|
Loading…
Reference in New Issue
Block a user