Image import doesn't allow for .jpeg extension
Drag and drop of an image with an extension of .jpeg fails
Renaming the file to have a .jpg extension and it can get imported.
Culprit seems to be in file ...mscore/dragdrop.cpp, method ScoreView::dragEnterEvent() which allows for .svg, .jpg, .png, .gif and .xpm extensions.
Another occurence is in file ...mscore/file.cpp, method MuseScore::addImage(), which only allows for .svg, .jpg, .png and .xpm extensions.
Yet another is in file ...mscore/Palette.cpp, method palette::dragEnterEvent(), which only allows for .svg, .jpg, .png and .xpm extensions.
This report stems from http://musescore.org/en/node/23284, picture taken from there, reported for 178bfe6 on Win 8 pro
Extending these methods to also allow .jpeg should be easy enough?
And while at it, also extending MuseScore::addImage() and Palette::dragEnterEvent(), to allow .gif too?
Comments
I'll have a look at it over the weekend and will see whether I can come up with a pull request.
https://github.com/musescore/MuseScore/pull/510
As I don't have a build environment, this is untested.
Reg. the error message: it should better talk about "unknown extension" or "unknown type" rather than "unknown format", as MuseScore does know the JPEG format quite well.
I've opted for "unknown type" as that best matches the error FILE_UNKNOWN_TYPE
Fixed in 3c2165d74b
the jpeg issue is indeed solved, but .gif don't get imported, not sure why that is?
Are we just lacking the right lib, like qgif.dll?
We have a dll for jpeg, mng (I guess that includes png), svg and tiff
So could we support .mng (apparently some sort of animanated png) and .tif, .tiff (by just adding them to the list of supported extensions), but not .gif? I see .gif being allowed for wallpapers, but it doesn't seem to work there either.
We need to put a limit somewhere... According to wikipedia , JPG files can have an extension (I believe this is the right word btw, and not file type) of .jpg and .jpeg, though .jpe, .jfif and .jif are also used. Should we support all these options?
MNG, TIFF, GIF, XPM we can probably find other exotic image formats... and of course, animated version of them, and then what do we do when we print them? or save as PNG?
I believe that "less is more". I propose to
* support only JPG and PNG (eventually with jpeg extension) and of course SVG for vector graphics
* remove the support for GIF and XPM.
* remove GIF support in wallpapers
I'm fine with removing .gif and .xpm, esp as gif doesn't work anyway and either never were documented to be supported. I'd allow .jpg and .jpeg, but none of the other JPEG extensions, they are pretty exotic IMHO.
Want me to send in a pull request for the .gif and .xpm removal?
Not sure though whether the qtiff.dll would still be needed or how to remove it.
Windows calls it 'type', so I'd go with that.
A PR would be cool. On top of your current one would be great. And even more, it would be even better if you could at least compile the code and test it before pushing :)
I don't have a build environment and won't have one short term. I know that it'd be better...
The gif problem though must exist since quite while, my addition and tests just uncovered it :-)
MusicXML seems to support gif and tiff (see ...mscore/schema/musicxml.xsd), so maybe we shouldn't remove tiff but add it instead (.tif and .tiff) and make .gif work?
No. I stand on my first opinion. Less is more.
https://github.com/musescore/MuseScore/pull/513
Remove ltiff.dll too?
While you may be right reg. less is more, if we have to support tiff and gif for MusicXML anyway, we'd basically get it for free in the normal image-, background- and wallpaper import and maybe even export, we'd just have to enable it there and fix the gif part, which for MusicXML we'd have to fix anyway.
What does Leon have to say about the MusicXML part?
Fixed in 16535ae16a2
Automatically closed -- issue fixed for 2 weeks with no activity.