GNOME Bugzilla – Bug 553098
Unrecognized image format
Last modified: 2010-11-03 12:08:19 UTC
Environment: * Debian unstable ("sid"): * libspreadsheet-writeexcel-perl 2.25-1 * openoffice.org-calc 1:2.4.1-9 * Gnumeric trunk Reproduction steps: * Produce a bmp: convert /home/ray/Desktop/earthlights.jpg -resize 640x200 /tmp/earthlights.bmp * Use Spreadsheet::WriteExcel to include it in an xls: test.pl * Open with gnumeric: gnumeric earthlights.xls Results in ** (gnumeric:32544): WARNING **: Unrecognized image file format and the file being opened with the placeholder image. * Open with oocalc: oocalc earthlights.xls results in the file being opened and the image being displayed properly.
Created attachment 119074 [details] BMP file used for testing
Created attachment 119075 [details] Perl script to generate xls
Created attachment 119076 [details] XLS generated by perl script
The image is stored in dib format which seems to be not supported by gdk-pixbuf.
*** Bug 490584 has been marked as a duplicate of this bug. ***
Created attachment 173731 [details] [review] 0001-excell-read-Put-bmp-header-creation-in-its-own-funct.patch The problem here is that we are passing a dib to gdk pixbuf without adding a bmp header. I'm attaching a patch series which fixes this.
Created attachment 173732 [details] [review] 0002-Add-bmp-header-to-dib-image-objects-data.patch
Created attachment 173733 [details] [review] 0003-Add-a-define-for-bmp-header-size.patch
Patches committed: http://git.gnome.org/browse/gnumeric/commit/?id=c3dac2b0e04ed7b337a016d33ba463ef108ad373 http://git.gnome.org/browse/gnumeric/commit/?id=a6d518e2d513bb02215cda4649a4c35a859060db http://git.gnome.org/browse/gnumeric/commit/?id=5e9e8b7dfdbf0edeb98acbb1906e63e3e5c88b01 and credit given: http://git.gnome.org/browse/gnumeric/commit/?id=2d644c9d453021e3e383b5394beea22c31812f06 Thank you very much, Hans!