GNOME Bugzilla – Bug 155696
add support for XLS import with image generated by Perl/PHP libraries.
Last modified: 2006-10-10 15:21:53 UTC
both Perl's Spreadsheet::excel, and the PHP version Spreadsheet_Excel_Writer both appear to use rectangles, with fills to write images to excel. Importing this into gnumeric just shows a blank rectangle. (simple code to generate an xls file) http://devel.akbkhome.com/flexyshipping5/tests/sheet.php (source) http://devel.akbkhome.com/svn/team.php/flexyshipping5/tests/sheet.php The writing routine is in here: (look for 'function insertBitmap') http://cvs.php.net/co.php/pear/Spreadsheet_Excel_Writer/Writer/Worksheet.php It would be nice if this worked..
The image is an IMDATA record in Windows native bitmap format. We don't support this yet, but we have understood since August how it works. The format is OS/2 BMP, but the 14 byte header is missing.
Presumably a matter of making gdk-pixbuf understand the format.
I have code in my tree to add the header before passing it to gdk_pixbuf. At the moment, it dumps the image file to my disk. It wasn't clear to me how to hook the image up to gnumeric
Committed code so that excel_read_IMDATA returns a valid pixmap when it reads headerless OS/2 bitmap.
Created attachment 48706 [details] [review] Patch to realize IMDATA images This patch stores the IMDATA as an MSObject attribute, and realizes it. In plain language - makes the image show up on the screen.
Let's get this in once we branch. The cruft in MSObj is looking more and more unfortunate. We may want to move to a straight gvalue approach with some hooks on the assignment side to store things from property bags into gobjects.
Created attachment 56168 [details] [review] Patch updated to match current CVS No idea why bugzilla flags this bug as "changed today". Anyway, I tested the patch against current CVS and made it apply cleanly.
Created attachment 56170 [details] [review] Patch updated to match current CVS - one more try Uploaded the old version by mistake - trying again
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.