Created attachment 103476 [details]
A file with an imported *.png image.
When I use the Save Graphic context menu to save a picture from writer (imported from PNG or JPEG but not SVG) and choose JPEG in the drop-down menu the file is saved normally and normally previewed in Gwenview (KDE standard image editor). However, if I try to import it in GIMP this results in the following error:
JPEG image Message
Not a JPEG file: starts with 0x89 0x50
Opening '/tmp/Pic3.jpg' failed:
raw image plug-In could not open image
The second message is probably from the default plugin used to open unidentified files in GIMP, while googling up the first message suggests that instead of writing a JPEG header LO writes a PNG header to the file. Moreover, if I change the file extention to *.png the file is opened in GIMP without any issues.
Steps to reproduce:
1) open the attached *.odt file
2) right-click on the ball image (courtesy of openclipart collection)
3) choose Save Graphic... and save the file as JPEG (choose from drop-down menu)
4) open Gimp and choose File>Open to open the image file and see the error
Thank you for reporting this issue! I have been able to confirm the issue on:
Platform :Ubuntu 14.04
Hi kvr -
So you attached an odt file that opens in writer but you set the component to DRAWING. Can you clarify here? When I open writer and follow your steps, I can open the exported jpeg fine in GIMP.
Marking as NEEDINFO, please clarify the above and then mark as UNCONFIRMED. Thanks!
I'm sorry, but your comment is slightly confusing, were you able to reproduce the bug or not?
I guess GIMP is not the best option to check the nature of the file (PNG or JPEG), so let's use the Unix "file" utility for further experiments (mine is version 5.09). If I run
/path/to/exported/file.jpg: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced
So it's not a jpg, but a png.
Speaking of DRAWING component. Well, my bad, maybe I put the bug in the wrong category. Where do you think I should put the bug which affects the image export function? I found this problem in Writer, Draw and Impress, but not Calc (there is no Save Graphic function in the context menu).
(In reply to comment #2)
> So it's not a jpg, but a png.
I guess what you meant is the image embedded as PNG in ODT. Yes it is, shown in content.xml of the file:
<draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:width="3.351cm" svg:height="3.351cm" draw:z-index="0"><draw:image xlink:href="Pictures/1000020100000040000000400AE95537.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
Perhaps related to filesave bug in Impress (observed in SVG): https://bugs.freedesktop.org/show_bug.cgi?id=80849#c9
Could you please try daily build newer than 2014-07-23 ? David Tardon said that should be fixed.
Created attachment 103595 [details]
Image output generated by Save Graphic... function in LO Writer; a png file with *.jpg extension.
Please see comment #4 about this file.
I checked the issue in LO Writer version 4.3.1 from the current branch (Build ID 0cb7d753b6b51411ab8dd72eab79f855a1d21c4d), dated 28th of July, and the issue persists.
When I was making the test file, I added the picture in PNG format, so no wonder that it is embedded as a PNG. However if I try to EXPORT the picture from writer and choose JPEG as the output format the picture is nevertheless EXPORTED as a PNG, as we can see from the output of file utility. It looks like the Save Graphic function just changes the file extension from *.png to *.jpg without altering the file itself.
For clarity I included in the attachments the *.jpg file (output.jpg) that is generated by the Save Graphic function in LO writer. Again, its extension is *.jpg, however the file utility says, that it is a PNG.
Sorry! The attachment comment links to itself instead of linking to this comment.
I'm sorry I misread this bug while dropping comment 4.
(In reply to comment #4)
> Created attachment 103595 [details]
> Image output generated by Save Graphic... function in LO Writer; a png file
> with *.jpg extension.
Just want to confirm that something wrong with the output file. Image Viewer (default viewer in Ubuntu) can't open that JPG file.
Trying image insertion with the JPG file in Impress also fail with error message: "Image filter not found". Looks like a serious bug but I don't know correct method to verify the file format.
And I can reproduce from scratch with a PNG file.
Tested with LO 188.8.131.52 - Ubuntu 12.04 x86
Component should be Writer as Joel said.
Shall the bug be marked as confirmed?
Also, could you please check your test results with the console "file" utility (please see comment #2 for instructions). It should be quite correct, as far as I know.
(In reply to comment #7)
> Also, could you please check your test results with the console "file"
> utility (please see comment #2 for instructions). It should be quite
> correct, as far as I know.
Yes, as you observed. But honestly I don't know correct method to verify the file format...just confirming that something wrong since Impress reject the file (surprisingly Writer does not reject the file).
I can also reproduce that issue (Save PNG Graphic as JPG) with Impress.
Perhaps we should wait others opinion to confim what is wrong here.
This bug is closely similar to Bug 75786
Other related bugs: Bug 41345, Bug 60684
works fine in Version: 184.108.40.206 Build ID: 420m0(Build:2) on Debian Wheezy Backports WITH 'Automatic File Name Extension'.
err ignore above comment - bug EXISTS in Debian wheezy Backports 220.127.116.11.
deathstar> file -i klingon.jpg
klingon.jpg: image/png; charset=binary
and GIMP-Image-Image Properties treats it as a png file
*** This bug has been marked as a duplicate of bug 60684 ***