SVG <image> doesn't work in newer Puppies

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
HerrBert
Posts: 357
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 18 times
Been thanked: 126 times

SVG <image> doesn't work in newer Puppies

Post by HerrBert »

Hello.

Some time ago i used svg image files to create overlays for icons and wallpaper transitions. Still using this method in Slacko 6.3.2 and all works well, although there's a prefix not bound to a namespace. xmlns:xlink="http://www.w3.org/1999/xlink" is missing there. Found this mistake when browsing my icon directory with rox in ScPup64. There were no thumbnails for my overlayed icons and viewnior shows a blank, transparent box.

After i have updated all my svg files, they still don't display the images. Even rsvg-convert outputs an empty png file on ScPup64.
I can open these overlayed svg's with Inkscape Lite and my internet browsers (Palemoon, Light, Firefox).

Same problem in bionicpup64 and fossapup64.

Sample code for testing:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="96"
     height="96">
  <image
     x="0"
     y="0"
     width="96"
     height="96"
     xlink:href="/usr/local/lib/X11/pixmaps/folder48.png" />
  <image
     x="48"
     y="48"
     width="48"
     height="48"
     xlink:href="/usr/local/lib/X11/pixmaps/archive48.png" />
</svg>

Can this be confirmed or did i miss something?

Attachments
missing-svg-image.jpg
missing-svg-image.jpg (40.89 KiB) Viewed 845 times
User avatar
norgo
Posts: 283
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 6 times
Been thanked: 111 times
Contact:

Re: SVG <image> doesn't work in newer Puppies

Post by norgo »

@HerrBert

usage of svg xml code for creation of a png overlay ?
to be honest this is a very strange method

I think mick's pngoverlay is exactly what you need

Code: Select all

pngoverlay-cairo-0.1

Generate a PNG file overlayed from a source and overlay A 48x48 PNG output icon is generated

Usage :
pngoverlay-cairo [source path] [overlay path] [output path] alid PNG paths are required
HerrBert
Posts: 357
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 18 times
Been thanked: 126 times

Re: SVG <image> doesn't work in newer Puppies

Post by HerrBert »

norgo wrote: Fri Dec 18, 2020 2:04 am

@HerrBert

usage of svg xml code for creation of a png overlay ?
to be honest this is a very strange method

I think mick's pngoverlay is exactly what you need

Code: Select all

pngoverlay-cairo-0.1

Generate a PNG file overlayed from a source and overlay A 48x48 PNG output icon is generated

Usage :
pngoverlay-cairo [source path] [overlay path] [output path] alid PNG paths are required

It might be a strange method to you, but i didn't want to create new icons from scratch. The icons i used have an indexed palette and alpha channel, so editing them with mtpaint is no fun...
Also i'm not sure, if it is possible to create a small overlay from a 'full-sized' icon at the bottom-right corner with pngoverlay.

A search on the internet gives very few results, but if i understand it right, loading of images into svg got very restricted since librsvg-2.so.2.40.20, so it's not a bug (but also not soved here...)

User avatar
norgo
Posts: 283
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 6 times
Been thanked: 111 times
Contact:

Re: SVG <image> doesn't work in newer Puppies

Post by norgo »

@HerrBert
pngoverlay creates and expect a size of 48x48 pixel.
to resize an overlay icon an place it in a corner is not possible,
but you can resize the overlay to the desired size an put it on a transparent background.
Here an example. It shows such a case.

Attachments
pngoverlay_example.mkv.tar
remove tar fake extension
(142.57 KiB) Downloaded 41 times
User avatar
takenp
Posts: 43
Joined: Tue Aug 25, 2020 10:38 am
Has thanked: 72 times
Been thanked: 13 times

Re: SVG <image> doesn't work in newer Puppies

Post by takenp »

@HerrBert

I dare to suggest it can be a problem of ROX/JWM (version, compiling flags) Look into this way.

=~=~=~=~
I'm running online-radio called Melodymaker
Listen it here https://radio.melodymaker.org

User avatar
mikeslr
Posts: 2965
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 922 times

Re: SVG <image> doesn't work in newer Puppies

Post by mikeslr »

If alternatives suggested entail the possibility of work-overload, maybe try this solution: https://stackoverflow.com/questions/561 ... cape-linux

I think that among ImageMagick's many command-line options, https://imagemagick.org/script/command-line-options.php may be ones for managing indexed palettes and alpha channels. Note the Search box on the page. It leads to many discussions which, unfortunately, are above my pay-grade.

p.s. Taking your general interest in graphics into consideration, getting the hang of Imagemagick may be worth the effort.

User avatar
Grey
Posts: 2024
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 76 times
Been thanked: 376 times

Re: SVG <image> doesn't work in newer Puppies

Post by Grey »

Not entirely correct. <image> element itself work in newer Puppies. Another thing is that ROX and Viewnior shows only the vector part of the SVG file.
Insert the following classic construction into your sample, for example:

Code: Select all

  <g fill="yellow" stroke="red" stroke-width="8">
    <circle cx="40" cy="40" r="25" />
    <circle cx="60" cy="60" r="25" />
  </g>

And the thumbnail will appear, but Viewnior and ROX show only vector part with circles. The bitmap portion is not visible on the thumbnail. But Inkscape will show all three parts - two icons and circles.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Post Reply

Return to “Bug Reports”