After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663078 - EPS support
EPS support
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Graphing / Charting
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-10-31 07:05 UTC by Jean Bréfort
Modified: 2012-03-10 07:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample file (24.51 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-10-31 07:05 UTC, Jean Bréfort
Details
sample file with an svg image inside (9.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-10-31 14:01 UTC, Jean Bréfort
Details

Description Jean Bréfort 2011-10-31 07:05:34 UTC
Created attachment 200321 [details]
Sample file

When opening attached file, I get:

Unexpected element 'table:shapes' in state : 
	document-content -> body -> spreadsheet -> table

Note that the "shape" being an eps image, we also need to add eps support in GOImage API to fully fix this bug.
Comment 1 Andreas J. Guelzow 2011-10-31 07:42:24 UTC
Note that technically the "shape" is not an eps file but a draw:frame. The draw:frame in this case happens to contain an image which in this case appears to be an eps file only, in circumvention of the ODF standard that states: "While the image data may have an arbitrary format, vector graphics should be stored in the [SVG] format and bitmap graphics in the [PNG] format." So supporting the eps format would really be low priority since it should be SVG or PNG.

Moreover, a shape in table:shapes is a shape attached to the table (sheet) proper rather than anchored to any specific cell. Technically Gnumeric does not support such shapes at all.
Comment 2 Jean Bréfort 2011-10-31 07:53:39 UTC
(In reply to comment #1)
> Note that technically the "shape" is not an eps file but a draw:frame. The
> draw:frame in this case happens to contain an image which in this case appears
> to be an eps file only, in circumvention of the ODF standard that states:
> "While the image data may have an arbitrary format, vector graphics should be
> stored in the [SVG] format and bitmap graphics in the [PNG] format." So
> supporting the eps format would really be low priority since it should be SVG
> or PNG.

It might be not that difficult, using libevince (or so).

> Moreover, a shape in table:shapes is a shape attached to the table (sheet)
> proper rather than anchored to any specific cell. Technically Gnumeric does not
> support such shapes at all.

It would be easy to fix that, imho.
Comment 3 Andreas J. Guelzow 2011-10-31 13:43:02 UTC
How did you create this file in LibreOffice? When I add a picture it ends up inside a draw frame in a table cell. I need a file with an image we support inside a frame inside a table:shapes element.
Comment 4 Jean Bréfort 2011-10-31 14:01:58 UTC
Created attachment 200336 [details]
sample file with an svg image inside

I just Insert/Image/From file...
Comment 5 Andreas J. Guelzow 2011-10-31 14:08:26 UTC
If I use Insert/Image/From it ends up inside the selected cell, ie. inside a <table:table-cell>.
Comment 6 Jean Bréfort 2011-10-31 14:23:55 UTC
Not here, apparently, very strange.
Comment 7 Andreas J. Guelzow 2011-10-31 14:37:09 UTC
We are now reading those shapes, but we get for the

eps image:
** (gnumeric:16495): WARNING **: Unrecognized image file format
and the unrecognized-image image is shown

svg image:
** (gnumeric:16495): CRITICAL **: go_image_new_from_data: assertion `type != NULL' failed

** (gnumeric:16495): WARNING **: Unrecognized image file format

and again the unrecognized-image image is shown

In the latter case the bt for the CRITICAL is:

Breakpoint 1, 0xb70f2f34 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
(gdb) bt
  • #0 g_log
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #1 g_return_if_fail_warning
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #2 go_image_new_from_data
    at go-image.c line 461
  • #3 sheet_object_image_set_image
    at sheet-object-image.c line 147
  • #4 od_draw_image
    at openoffice-read.c line 6750
  • #5 push_child
    at gsf-libxml.c line 607
  • #6 lookup_child
    at gsf-libxml.c line 643

Note that sheet_object_image_set_image is called with a type of "". Inside the ODF file we do not know the type of the image:
<manifest:file-entry manifest:media-type="" manifest:full-path="Pictures/2000012200002A900000127321A322BA.svm"/>

but we aren't even trying to obtain the type.

For the eps file, similarly the ODF manifest does not give a type:
 <manifest:file-entry manifest:media-type="" manifest:full-path="Pictures/20000002000002590000012D59FC8949.eps"/>
Comment 8 Jean Bréfort 2011-10-31 15:52:11 UTC
The eps is not an issue, goffice recognizes that. Just we can't display it at the moment.
Comment 9 Jean Bréfort 2011-10-31 16:28:36 UTC
Fixed the critical(s), and the crash which occured when trying to save the image as a file.

Clearly, LibreOffice does not support svg properly.
Comment 10 Andreas J. Guelzow 2011-10-31 16:41:59 UTC
Sending to goffice since the remaining issues: eps and GDI support are within its domain.
Comment 11 Jean Bréfort 2011-10-31 19:19:29 UTC
eps support, certainly, but I don't think that GDI support is worth the effort all the more so as there is apparently no documentation available, except the code in OOo/LibreOffice which are released with a license (LGPL-v3) incompatible with ours.
Comment 12 Jean Bréfort 2011-11-04 13:18:34 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

It's in (if libpresent is there at configure time). Not perfect though, since resolution is not excellent, should be enhanced in needed and if time permits.

About GDI support, I vote for WONTFIX.
Comment 13 Jean Bréfort 2012-01-16 07:38:19 UTC
Actually we can't use libspectre for now because it uses libgs which overrides some jpeg methods (memory handlers) and this makes gnumeric crash when inserting a jpeg image.
Comment 14 Jean Bréfort 2012-03-10 07:59:43 UTC
Should now work with next ghostscript release.