[tdf#144553] Is Draw correctlly responding when it over writing the image which is being edited?

I opened an image, a jpg if that matters, for editing. I got it opened by Draw. I did what looks to me an irrelevant, and nonsense modification. For the sake of having the image modified. Inserting a line onto the image, in my case. The next thing I did was to export the image to the original file. In effect, attempting to over write the file being edited with the modified image. Draw asked me to confirm I want to over write an existing file. I agreed for the over writing. Draw accepted my confirmation and continued as there is no problem. My problem is that the outcome was an empty file. Neither the original file, nor the modified file. Do you find that acceptable? Can you reproduce the problem? Should I write down more concrete instructions for how to reproduce?
I think the lock file disappeared at some point. After opening the file, I saw the lock file in the file system. I am not sure when, and why, it was removed.

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 2; OS: Linux 6.9; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
24.2.5-1
Calc: threaded

Or, maybe a jpg file with just a line in it?
If just the line was selected and you chose export to jpg, selection only, then only the line would be exported.

An important thing to remember about jpg files is that every time you open and save it again, it deteriorates thanks to the jpg compression. Always keep the original jpg.

Empty as zero bytes long? Or nothing shown in a picture viewer? Or even an error when opening?

They are always removed, when LO closes the file, and they do not protect you from changin the open file with the program, wich created the lock.

The corruption on resave is tdf#144553.

In LibreOffice, you can’t edit a JPEG file. In general, the file types that are considered editable by LibreOffice modules are found it respective modules’ File → Save As... dialogs. Note that for Draw, this dialog currently only contains three file types: odg, otg, and fotg. No “jpg”.

There is also File → Export..., with more file types. But that export dialog is exactly for the file types that the program can generate for export, not for the file types considered “editable”.

Also, some of these (and some other) file types may be imported by LibreOffice. This, again, doesn’t mean that you open these files for editing: you import what LibreOffice could import from these files, into a new document.

This is important to realize. The distinction is the essence of the differentiation between the two dialogs (Save As vs. Export). And this is the reason that you see what you describe.

And of course, this is reasonable for Draw. You seem to expect that Draw is a JPEG editor. No, it is not any kind of raster image editor at all. It is vector-based. It imports any raster images as vector primitives (each containing the raster as its content), and it may export the whole scene it generated, or its selected parts, to a new raster file; but it doesn’t pretend to edit these files.

Check what you export. Was it selection?

(Note that for this discussion, the terms “open”, “import”, and “export” are used in a user-oriented way, not in a technical way; this is important here, and trying to use technical meaning, where all documents are imported and exported, would be using wrong semantics.)

Thank you, in particular for the explanation about the terms.
The answer for your question is I exported the whole scene. I agree this issue seems to be, in fact, tdf#144553. I will try to modify the title to add a reference to tdf#144553.

1 Like