Bug 41345 - Image save as does not respect filetype (always gif)
Summary: Image save as does not respect filetype (always gif)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: File-Dialog Writer-Images EMF-WMF
  Show dependency treegraph
 
Reported: 2011-09-29 12:49 UTC by Kevin Hunter
Modified: 2020-02-24 09:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test kit, see Comment 2 (96.38 KB, application/zip)
2011-10-02 03:57 UTC, Rainer Bielefeld Retired
Details
mytestsmiley_svg in Web browser and Draw (195.03 KB, application/zip)
2011-10-03 05:02 UTC, rk601
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Hunter 2011-09-29 12:49:10 UTC
Referencing the same document as attached to Bug #41013.

On or about page 5 is an embedded EMF, captioned "Figure 1".  There's no indication that it's an EMF (is there?), but when I right-click on it and select "Save Graphics", there are a plethora of formats as which I may apparently save it.

Problem: only some of the file formats work.

For instance, if I select SVG, GIF, or EPS, a file is created in the file system, but it is zero bytes.

Conversely, I can select BMP or PNG and a file is saved, that is apparently correct as viewed by an outside program.

This appears to have implications farther than just the ability to "Save Graphics" as advertised, as an export to PDF of the entire document also does not display the image properly.
Comment 1 Kevin Hunter 2011-09-29 12:52:20 UTC
Some perhaps pertinent information

$ git branch
* master

$ git log --pretty=oneline -1 eeefce57c8a415c8bc5a4b044849d1e85ba20447 Fix error: invalid conversion from 'long int*' to 'const GLint*'

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local --enable-ld=yes --enable-lto --enable-bootstrap
Thread model: posix
gcc version 4.6.1 (GCC) 

$ uname -a
Linux hani 2.6.35-30-generic #59-Ubuntu SMP Tue Aug 30 19:00:03 UTC 2011 x86_64 GNU/Linux
Comment 2 Rainer Bielefeld Retired 2011-10-02 00:46:45 UTC
[Reproducible] with "LibreOffice 3.4.3 RC2 - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:302)]". 

Th problem is not that the options are offered but that the export does not work.

I created a more simple test kit with a gif and a wmf as sample pictures. Export from DRAW works, but "Save as Picture" (DRAW) and "Save picture" (WRITER) will not work if you try to save these pictures form a document.

Steps to reproduce:

1. Download and unzip attached test kit
2. open testdocument.odt
3. Click the smiley
4. right click - > Context menu -> Save Graphic ... -> -> Select file type SVG 
   -> Type Name "mytestsmiley" -> <Save>
   "mytestsmiley.svg" will be created (make sure that auto-filenameextension is
   active)
5. open new "mytestsmiley.svg" using a browser 
   Expected: Smiley
   Actual: Error Message "XML-Verarbeitungsfehler: Kein Element gefunden ...
6. open new "mytestsmiley.svg" from DRAW
   Expected: Smiley
   Actual: Filter selector
   
You will get the same result doing the test with "testdocument.odg" and 
"Save as Picture", I believe that the WRITER problem will disappear when the DRAW issue has been fixed.

Other export formats might be affected.

Not a particular MASTER problem.

I can not confirm reporter's "Save as Picture.gif" problem, neither with 3.4.3 nor with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) English UI [(Build ID: 81607ad-3dca5fd-da627d2)]". Might be a different/related problem, a separate report might be useful.
Comment 3 Rainer Bielefeld Retired 2011-10-02 03:57:07 UTC
Created attachment 51873 [details]
Test kit, see Comment 2
Comment 4 rk601 2011-10-03 05:02:10 UTC
Created attachment 51893 [details]
mytestsmiley_svg in Web browser and Draw

On 2011-10-02 00:46:45 PDT Rainer Bielefeld updated SVG save image ERROR:

We also tested the creation of an SVG image via 'LibO -> Save Graphics...' and found that no graphic or picture was saved. We used the following:

LibO-dev 3.5.0 
Build ID: fdbe98e-3f7a742-4eb4f62-260b7c1
On OSX 10.6.8

Located at:

http://dev-builds.libreoffice.org/daily/MacOSX_10.6.7_Intel_no-moz/master/2011-10-01_13.36.19/

with

master~2011-10-01_13.36.19_LibO-Dev_OOO350m1_MacOS_x86_install_en-US.dmg

Please follow these steps to reproduce:

1. Download and unzip attached test kit
2. open testdocument.odt
3. Click the smiley
4. right click - > Context menu -> Save Graphic ... -> -> Select file type SVG 
   -> Type Name "mytestsmiley" -> <Save>
   "mytestsmiley.svg" will be created (make sure that auto-filenameextension is
   active)
5. open new "mytestsmiley.svg" using a browser 
   Expected: Smiley
   Actual: Empty graphic size 0KB; nothing appears within Web browser
6. open new "mytestsmiley.svg" from DRAW
   Expected: Smiley
   Actual: Filter selector
Comment 5 Kevin Hunter 2011-10-04 09:03:35 UTC
@Rainer, you're certainly much more the "bug list maintainer" than I, but shouldn't we leave this bug marked against version "LibO Master" since it affects master as well as earlier versions?

Or is the expectation that if it affects an earlier release, it also affects master?  As a developer on other non-LO projects, I'm much more keen to fix problems on master than older revisions.  (But this mindset is not universal -- i.e. it's very much project dependent -- so please set me straight.)
Comment 6 Rainer Bielefeld Retired 2011-10-04 09:35:40 UTC
@Kevin Hunter:
Version from picker should help to find out when (and so because of what reason because of what modification in the code of that version) 
the problem appeared: <http://wiki.documentfoundation.org/BugReport_Details#Version> 
That has nothing to to with the trunk / branch where the fix should be done

> I'm much more keen to fix problems on master
Yes, that's exactly the way how we are practicing in LibO. The general proceeding is that when a bug has been recognized (let's say in 3.3.0Beta) it will be fixed in Master and then the fix will be backported to the current branches if applicable. 

If I find that the problem does no longer exist in Master, I add 
"target:3.5.0" to the whiteboard 
<http://wiki.documentfoundation.org/BugReport_Details#Whiteboard>
and mark the bug RESOLVED WORKSFORME (if it's not known what Fix solved the problem.

I hope this comment helps to understand the current Bugzilla proceeding? If you have more questions, objections or proposals Mailing list 
<libreoffice-qa@lists.freedesktop.org> would be the best place.
Comment 7 Björn Michaelsen 2011-12-23 13:24:29 UTC
Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.
Comment 8 tester8 2011-12-30 13:49:03 UTC
Comment 2 reproduced with

LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI
Comment 9 A (Andy) 2014-03-08 21:21:44 UTC
reproducible with LO 4.2.1.1 (Win 8.1)
Comment 10 Joel Madero 2015-05-02 15:43:27 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2015-06-21 11:39:53 UTC
Repro (comment 2).

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 12 Heiko Tietze 2016-05-17 13:13:08 UTC
Test kit > smiley > save as: All files start with GIF89a (check this with a hex editor or just edit the file). That's true for bmp, gif, jpg, svg, and png in both Draw and Writer (moving to filter & storage therefore). All are actually gif formatted. 

Version: 5.2.0.0.alpha0+
Build ID: 6b232aeecc55f1715bc111e636e36a8e24827efb
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-26_07:40:04
Locale: de-DE (de_DE)
Comment 13 QA Administrators 2017-11-12 11:01:12 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2019-12-03 13:58:18 UTC Comment hidden (obsolete)
Comment 15 Timur 2020-02-24 09:07:24 UTC
I tested DOCX attachment 51359 [details] with master 7.0+ and it's different from described and from bug 60684.
All exported formats are different and none is zero bytes. 
Dialog shows zero bytes, but that's not correct. That should be a separate bug because confirmed in bug 60684. But let's wait until it is resolved, if ever. 
Some look good (WMF, BMP, JPG, SVG) and some don't (colors: PNG, GIF, wrong: EPS), but that's another issue that should be first checked for duplicates.

Comment 2 is likely a different issue. Anyway, saved SVG opens fine.

I'll close this bug.