Bug 33853 - PNG images cannot be loaded from ODF documents
Summary: PNG images cannot be loaded from ODF documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Libreoffice (show other bugs)
Version: 3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 14:38 UTC by Thorsten Behrens
Modified: 2013-10-25 23:11 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
bugdoc (76.94 KB, application/zip)
2011-02-02 14:39 UTC, Thorsten Behrens
Details
sample image, see Comment 3 (1.56 KB, image/png)
2011-02-03 03:09 UTC, Rainer Bielefeld Retired
Details

Description Thorsten Behrens 2011-02-02 14:38:36 UTC
There seems to be a class of PNG images that LibO cannot load anymore (but OOo can). See attached bugdoc.
Comment 1 Thorsten Behrens 2011-02-02 14:39:15 UTC
Created attachment 42874 [details]
bugdoc
Comment 2 wope 2011-02-03 01:59:29 UTC
the main difference between working and errornous pictures are in the IHDR chunk of the file. If the colortype byte is 6, the file works, if it is 2, it dosnt
work. In the specification 
(http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.IHDR)
stand:
   Color    Allowed    Interpretation
   Type    Bit Depths
   2       8,16        Each pixel is an R,G,B triple.
   6       8,16        Each pixel is an R,G,B triple,
                          followed by an alpha sample.

If you open the errornous file with MS Paint and save it again, it works.
Comment 3 Rainer Bielefeld Retired 2011-02-03 03:08:59 UTC
[Reproducible] with "LibreOffice 3.3.0 RC4 - WIN7  Home Premium (64bit) German UI  [OOO330m19 (build 6 / tag 3.3.0.4)]"

It's not a WRITER, but a general problem. I extracted the picture 
100000000000007400000060D55E1F69.png
If you try to insert it to a DRAW document or to open it with DRAW, you will get some filter error message ("Grafikfilter nicht gefunden").

No Problem with OOo 3.1.1, 3.4-dev and 1.4.1 (!)

I am pretty sure that all OS will be affected, but currently information is missing. 

@all:
What OS did you use for your test?
Comment 4 Rainer Bielefeld Retired 2011-02-03 03:09:51 UTC
Created attachment 42890 [details]
sample image, see Comment 3
Comment 5 wope 2011-02-03 03:47:28 UTC
I testet it with Win 7 and sUse 1.3, it is OS independ.AMD64 and x86
Comment 6 Björn Michaelsen 2011-12-23 11:52:45 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 7 sasha.libreoffice 2012-01-19 08:42:52 UTC
reproduced in LibO 3.5.0 beta 2 on Fedora 64 bit
some other experiment done:
MSWord 2007 on Windows XP opens this file with part of picture,
MSWord 2010 on Windows 7 opens all correctly
if extract picture from odt file:
Gimp opens part of picture on Windows and Linux
MSWord 2003 and default picture viewer on Windows opens picture correctly
if drag and drop picture to LibO, it creates new section (not recognizes file as picture)
Comment 8 Alex Thurgood 2012-01-23 07:27:50 UTC
Not sure whether this adds any useful information, but :

on Mac OSX, LibO 3.5RC1

1) I open a ODT document made with LIbO 3.3.x containing an *inserted* (not linked) PNG file in it (for example, my signature, which has alpha channel), the image frame holder displays an error and the PNG file is not shown.

2) If I then save that document in 3.5RC1, and then attempt to open it again in 3.3.4, for example, I get an general IO error message, and the document will not open. If I retry once more, the document will open, but the image file is now missing.

3) Once I re-insert the same PNG file via 3.3.4, the same ODT file opens fine in :

LibO 3.3.4
LibO 3.4.3
LibO 3.4.4

LibO-dev 3.5.0 
Build ID: e42dfec-c60ac25-41e7bcd-3b66bd0
 
LOdev 3.6.0 
Build ID: 87ec1f8-b204871-95bcc5e-4c1bcb5

and also LibO 3.5RC1, but the fact remains that the first time such a file is opened, it can not read the PNG file. Somehow, the reference to the file seems to get broken, despite it being inserted.

Quite possibly, this is not the same problem as the bug report.


Alex
Comment 9 bfoman 2013-08-14 21:03:55 UTC
Confirmed with:
Version: 4.2.0.0.alpha0+
Build ID: 087a610fcd5c0c354a9ed6bfccd3451b667d62a3
TinderBox: Win-x86@6-debug, Branch:master, Time: 2013-08-04_21:41:24
Windows 8.1 Enterprise Preview 64 bit

Picture is still not displayed. All good in Word 2013.
Comment 10 Julien Nabet 2013-10-25 23:11:14 UTC
I don't know if it may help since I don't know how to test a newer libpng version but last libpng version is 1.6.6 (see http://download.sourceforge.net/libpng/libpng-1.6.6.tar.gz). Now of course there could be some API incompatibilities.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.