Package: librsvg2-bin
Version: 2.60.0+dfsg-1
Severity: normal

According to the manpage:

       --keep-image-data
              For SVG documents that reference PNG or JPEG images, include the 
original, compressed images in the final
              output, rather than uncompressed RGB data. This is the default 
behavior for PDF and (E)PS output.

But this doesn't seem to work, neither without the option (as it
should be the default), nor with the option explicitly, neither with
images embedded in a data URL, nor referenced externally:

f=/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/previews/fullscreenpreview.jpg
  # any JPEG will do
cp "$f" jpeg-test.jpg  # doesn't seem to work with absolute paths at all, so 
copy to current directory
(
  echo '<svg viewBox="0 0 100 100" 
xmlns:xlink="http://www.w3.org/1999/xlink";><image 
xlink:href="data:image/jpeg;base64,'
  base64 "$f"
  echo '"/><image xlink:href="jpeg-test.jpg"/></svg>'
) > jpeg-test.svg
rsvg-convert --keep-image-data -f pdf -o jpeg-test.pdf jpeg-test.svg
pdfimages -j jpeg-test.pdf jpeg-test-out
ls jpeg-test-out*

gives:

  jpeg-test-out-000.ppm  jpeg-test-out-001.ppm

For comparison, using

  inkscape --export-type=pdf jpeg-test.svg --export-filename=jpeg-test.pdf

instead of rsvg-convert, the result is as it should be:

  jpeg-test-out-000.jpg  jpeg-test-out-001.jpg

==============================================================================
If this cannot be fixed easily, please at least fix the manpage and point
users to inkscape instead (whether or not you consider them "competition").
This would have spared me much time trying and testing.
==============================================================================

-- System Information:
Debian Release: 13.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), 
(500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages librsvg2-bin depends on:
ii  libc6                2.41-12+deb13u3
ii  libcairo-gobject2    1.18.4-1+b1
ii  libcairo2            1.18.4-1+b1
ii  libdav1d7            1.5.1-1
ii  libgcc-s1            14.2.0-19
ii  libglib2.0-0t64      2.84.4-3~deb13u3
ii  libpango-1.0-0       1.56.3-1
ii  libpangocairo-1.0-0  1.56.3-1
ii  librsvg2-2           2.60.0+dfsg-1
ii  libxml2              2.12.7+dfsg+really2.9.14-2.1+deb13u2

librsvg2-bin recommends no packages.

librsvg2-bin suggests no packages.

-- no debconf information

Reply via email to