drag and drop of the picture from firefox
Moderators: XnTriq, helmut, xnview
drag and drop of the picture from firefox
In case of drag and drop of the picture from firefox in the xnview (and MP) it save as *.bmp How to make that it save as *.jpg?
Re: drag and drop of the picture from firefox
Welcome to the forum, epson950.
I'm afraid there's not a lot Pierre (the developer of XnView) can do about this
I'm afraid there's not a lot Pierre (the developer of XnView) can do about this
Qt Bug Tracker ([url=https://bugreports.qt.io/browse/QTBUG-13725]Dragging a non-bitmap (*.png, *.jpg ect) from firefox to a qt drop target does not copy the correct image, it copies a bmp conversion of the image[/url]) wrote:This is partially a bug with firefox as well, see http://bugzilla.mozilla.org/show_bug.cgi?id=494989#c72, https://bugzilla.mozilla.org/show_bug.cgi?id=562344
Basically in windows firefox reports two different types of files when a png for example is dragged, the actual png or jpg in an windows specific istream, and a bmp format version of the file in the text/url-list that firefox must use internally.
The bug is that by default, the QMimeData object returns the bmp copy for the imageData() method rather than the png or jpg, whereas it should really be the opposite way around.
This is easy to test that it is not working properly, just drag a png with a transparent background to a qt ap that can display the image, (drop site example program for example), the background will be black rather than transparent as it should be.
I believe the code to read the data from the istream ect is already there in the QWindowsMimeImage converter class, it just needs to try the conversion from the windows specific clipboard formats first before looking at the url-list