draw:image vs draw:fill-image & multiple copies
Regina Henschel
rb.henschel at t-online.de
Thu Jul 18 21:02:10 UTC 2024
Hi David,
Dr. David Alan Gilbert schrieb am 18.07.2024 um 19:37:
> Hi,
> (Context: PDF importing a weird document with thousands of identical
> images https://bugs.documentfoundation.org/show_bug.cgi?id=88914 )
>
> If you insert an image into a Draw document you get a
> draw:frame with a draw:image inside, with the image data
The picture itself is only inside the draw:image element, if you use the
flat format (.fodp). Otherwise there is only a link to the image that is
in a separate folder.
>
> If you duplicate that image (copy/paste), you get a second
> draw:frame and second draw:image with the data again.
The image itself is only onetime in the folder. All copies have a link
to the same image.
>
> Is there any way with draw:image not to copy the data?
That would be only relevant for a document in flat format.
> I wondered if it was doable with a
> draw:image xlink:href=hmmsomething
> but couldn't figure out if it was possible to link back to your
> own images?
The links are set automatically all to the same image. Nothing to do for
you.
>
> But the other route is a
> draw:custom-shape
> to a style with a draw:fill-image-name
> to a draw:fill-image
>
> and then you can have multiple draw:custom-shape's sharing the
> draw:fill-image - and hopefully the style.
> Is there any downside to that?
It depends on the kind of image, what you will do with the image and in
which module you use the image.
The <draw:frame> element can contains more than one <draw:image> child
element. That is used for example for a svg-image. These child elements
have different mime-types, so that a consumer can take that one it is
able to render. If a consumer is not able to render the vector graphic,
it can take the bitmap, for example. That is not possible with a style
with image-fill.
Compared to shapes, images have specialized features:
* You can adjust color/contrast/brightness/gamma/transparency without
actually changing the image.
* The image need not be in the document itself, but can be an external
resource.
* You can define an "Image Map".
* You can define a "Contour Wrap".
* Images have events to trigger macros.
On the other hand, a custom-shape with bitmap fill can be used in
3D-mode. That allows perspective and 3-dimensional rotation.
Kind regards,
Regina
More information about the LibreOffice
mailing list