Created attachment 123105 [details]
Draw doc with image that can only be exported in PNG format
In the attached example.odg file, right-clicking on the flowchart diagram in the top-left and choosing Save Image pops up a dialog to save it.
You can choose other image format (SVG, GIF, JPEG etc.) but the image is always saved as PNG data.
Either it should be possible to save in other formats, or if only in the same format as embedded in the document, a choice of other formats should not be presented when saving.
On Windows 10 Pro 64-bit en-US with
Version: 220.127.116.11 (x64)
Build ID: fe4d9e69c82c6ee6db3c27cd5e2d47558afa80ac
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL;
Locale: en-US (en_US)
Confirming. The context menu "Save Image..." call of .uno:saveGraphic does not convert the image, and that with its Export Image labeled dialog the "Save as" drop down selector will just assign a file extension--incorrectly to the image's format. No change of image format occurs.
The context menu "Save Image" dialog is incorrectly labeled as "Image Export" and should not offer save-as type formats other than the image format. It affects PNG with Alpha transparency, and normal PNG bitmaps as well as JPEG bitmaps.
Would have to test a bit more for Save Image for other image formats inserted into Draw document--but believe the .uno:saveGraphic dialog called from context menu "Save Image" does not convert formats.
This is distinct from actual Export where, an image when selected ("Bitmap with transparency" showing in the status bar in this test case), performed from the File -> Export with "selection" and if desired with "Automatic file name extension" does perform conversion. To me, the export behavior is correct, but the Save Image <-> .uno:saveGraphic command/dialog needs adjustment.
It is not so clear. For an embedded svg-image, the saved file format corresponds to the selected one. So conversion happens. But it is done with default settings.
(In reply to Regina Henschel from comment #2)
> It is not so clear. For an embedded svg-image, the saved file format
> corresponds to the selected one. So conversion happens. But it is done with
> default settings.
@Regina, your right of course. But question then about what the filters are doing differently in the .uno:saveGraphic commands and why SVG would be handled differently than bitmaps.
What should the correct behavior be for the uno:saveGraphic? Since it should be fixed one way or the other for consistent UX.
** Please read this message in its entirety before responding **
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present on a currently supported version of LibreOffice
(5.2.5 or 5.3.0 https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the version of LibreOffice and
your operating system, and any changes you see in the bug behavior
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave
a short comment that includes your version of LibreOffice and Operating System
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)
If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)
2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword
Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa
Thank you for helping us make LibreOffice even better for everyone!
As per the request in Comment 4, I'm confirming this is still an issue in LibreOffice 5.3. Select image, right click -> Save, and the dialog provides a choice of image formats. The data will only be saved in the original format however, regardless of which format is chosen.
This is also an issue on Windows so setting OS to all to raise visibility.
This probably need UX input as well?
Simplest solution is to rename the function to 'Save as PNG' with a filter that does not provide other file types. Sounds like an easyhack to me.
Just noting that this is still an issue in LO 6.1, that I experienced today. (Someone sent me a .odt file with lots of photos, and I wanted to save them as JPEGs, but they are always saved in PNG format, regardless of the filter chosen).
I agree with Heiko's suggestion to rename the menu entry to "Save as PNG...". If anyone has a code pointer, I can try to fix it myself and do my first EasyHack ;-)
Actually it looks like the structure of the menu is defined here:
The specific line being:
Is the text defined in: https://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
2174 <node oor:name=".uno:SaveGraphic" oor:op="replace">
2175 <prop oor:name="Label" oor:type="xs:string">
2176 <value xml:lang="en-US">Save Image</value>
2178 <prop oor:name="ContextLabel" oor:type="xs:string">
2179 <value xml:lang="en-US">Save...</value>
2181 <prop oor:name="Properties" oor:type="xs:int">
It looks to me like line 2179 needs to be changed. But I should do it myself and rebuild LO to test :-)
(In reply to Mike Saunders from comment #9)
> It looks to me like line 2179 needs to be changed. But I should do it myself
> and rebuild LO to test :-)
You become a fully qualified hack0r, resistance is futile. More about terminology is here https://design.blog.documentfoundation.org/2018/02/28/easyhacking-all-about-terminology/ - but you apparently found the right place.
After renaming you also need to adjust the dialog filter. But my skills are not sufficient to modify the filter after finding
* https://opengrok.libreoffice.org/xref/core/svx/sdi/svx.sdi#4359 => SID_SAVE_GRAPHIC
* https://opengrok.libreoffice.org/xref/core/sw/source/uibase/shells/grfsh.cxx#151 => GraphicHelper::ExportGraphic
(I expected something like "...Filter = [*.png|*.jpg|*.bmp]" but the file types are generated somewhere else in the dependency hell.)
A polite ping, still working on this bug?
It's assigned to me, but I don't have the knowledge to follow up the "you also need to adjust the dialog filter" mentioned by Heiko in comment 10. So maybe leave it open in case someone else has an idea?
It's assigned to me, but I don't have the knowledge to follow up, so no :-)
It's assigned to me, but I don't have the knowledge to follow up, so no :-) Setting to NEW