SVGViewer

Submit portable freeware that you find here. It helps if you include information like description, extraction instruction, Unicode support, whether it writes to the registry, and so on.
Post Reply
Message
Author
billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

SVGViewer

#1 Post by billon »

https://code.google.com/archive/p/osspa ... ads?page=5
svg viewer from Qt 4.8.2 (opengl mode)
support animation but less quicker and conformant than librsvg
Image

DL - https://storage.googleapis.com/google-c ... viewer.exe (2.9 MB)
Port/Stealth
No settings
Support Unicode

There also command line rsvg-view-3.exe

Found it through author's blog
Last edited by billon on Tue Feb 27, 2018 4:27 pm, edited 3 times in total.

User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: SVGViewer

#2 Post by webfork »

I'm having trouble finding additional data on that. Is there a homepage? This post didn't seem very flattering:
http://opensourcepack.blogspot.com/2012 ... ndows.html

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: SVGViewer - Rescaled

#3 Post by __philippe »

I recently came across an intriguing SVG image file,
(yet another submarine cable map, a current obsession of mine...), marred only by fuzzy, unreadable text.

Reduced original:
Image


Full size original, equally unreadable:




The current "SVGviewer" topic looked like a promising source for a quick fix to properly view and resize the above image.
However, as some of the interesting references given therein lead to dead-ends, a few substitute methods were considered to solve the issue:


1. XML code tuning
Since the target image is defined in an SVG text file, it should be possible to fiddle with the (clumsy) XML code and tune it to resize the image correctly;
(remember: SVG = Scalable Vector Graphics).
However, that would involve arduous work in perusing an SVG 101 primer;
as a certified practitioner of the least effort expenditure principle, I had to reluctantly turn down this option...;-)


2. Using online sites providing free SVG reading-resizing service.
After testing several such sites with disappointing results, the following candidate
appears to provide some fairly decent outcome:



3. Lazy person "Quick & Dirty" solution: opening SVG file in Chrome / IE11 browsers

3.1 Chrome (59.0)
"CTL-O" will let you select the appropriate *.svg, which does indeed render fine, in a fixed display box.
Regrettably, no amount of "CTL+/CTL-" will convince Chrome to resize the SVG, which stubbornly retains its original size... :shock:

3.2 MS IE(11)
Rather surprisingly, the very same SVG file will open nicely in a scrollable combo-box, and resize gracefully, up or down, via CTL+/CTL- :!:

Furthermore, the rescaled file can be saved as any of *.png / *.bmp / *.svg file.

A rare case of Microsoft getting the better of Google... :mrgreen:

Scaled up, cropped original:
Image

SVG rescaling problem licked...;-)

User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: SVGViewer

#4 Post by webfork »

Intersting post, philippe.
__philippe wrote:A rare case of Microsoft getting the better of Google... :mrgreen:
Interesting. I've had pretty good luck with SVG files under LibreOffice and (strangely) BlueGriffon. Firefox seemed to do an okay job as well.

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: SVGViewer - Rescaled

#5 Post by __philippe »

webfork wrote:...I've had pretty good luck with SVG files under LibreOffice and (strangely) BlueGriffon. Firefox seemed to do an okay job as well.
@webfork
Indeed, the Mozilla-based browsers engines appear to behave better in rendering SVG images, even for images including questionable code.

Yet, there is a further twist to the above write-up : ;-)

As an experiment, I tried processing the target SVG file with the online editor tool mentioned in option #2:
http://vectorpaint.yaks.co.nz/

Code: Select all

• Import original "deepblue.svg" into VectorPaint online SVG editor
• Scale up the image until easy reading is achieved
• Save the rescaled image file under a new *.svg name
• Open the modified file in Chrome
[/medium]
...SUCCESS :!:

The modified SVG file now opens in a properly scrollable combo-box, and can be scaled up or down at will within Google Chrome.

(Still, note that Chrome cannot save the file in any other format but SVG)

Which seems to demonstrate the "non-scalable SVG" defect cannot be blamed entirely on Chrome SVG rendering engine,
but should be rather traced all the way back to a source SVG image clumsily produced.

PS
- The first IE(11) vs Chrome(59.0/June 2017) experiment was performed under Win7.
- This last test works fine also with older Chrome(49.0/April 2016) under WinXP

Specular
Posts: 443
Joined: Sun Feb 16, 2014 10:54 pm

Re: SVGViewer - Rescaled

#6 Post by Specular »

__philippe wrote:I recently came across an intriguing SVG image file... The current "SVGviewer" topic looked like a promising source for a quick fix to properly view and resize the above image.
However, as some of the interesting references given therein lead to dead-ends, a few substitute methods were considered to solve the issue:

1. XML code tuning
Since the target image is defined in an SVG text file, it should be possible to fiddle with the (clumsy) XML code and tune it to resize the image correctly;
(remember: SVG = Scalable Vector Graphics).
However, that would involve arduous work in perusing an SVG 101 primer;
as a certified practitioner of the least effort expenditure principle, I had to reluctantly turn down this option...;-)
It's actually very simple to set fixed dimensions in an SVG file using any text editor. The <svg> element at the top of the text file is where we can define the width/height. In its current form the element is like so, lacking width/height properties:

Code: Select all

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1224 792">
The viewBox for the overall svg element is typically what the original dimensions of the graphic were when designed, and it allows the browser to scale it while keeping the original aspect ratio. However we can see there are no explicit width/height properties defined, as the site didn't need it.

Since we'd like to add them we can add a fixed width/height in pixels like so:

Code: Select all

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1224 792" width="1224px" height="792px">
Voila. The SVG will now have fixed dimensions and zoom in further in Chromium. You can also just include either width or height individually which is easier.

One of the reasons the image seemed to remain the same size on the site when zoomed is because the site added mobile width breakpoints and made the image width 100% of the container, so as you zoomed in you were simultaneously triggering the progressively smaller width stylesheets and the image respected the fluid 100% width so there wasn't a 'fixed' size the browser could scale up from. Alternately If you opened the image by itself in Chromium it still won't scale, but that's due to Chromium's unique (and either intentional or unintentional) handling of SVGs without width/height properties as Firefox/IE behave as you want when viewing SVGs on their own. As you've seen though it's trivial to add fixed dimensions in a text editor, which may help next time :)

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: SVGViewer - Rescaled

#7 Post by __philippe »

@Specular

Wow ! Thanks for your very apt primer about quickly fixing the original SVG code.
Superb explanation, clarifying the intricate relationship between "viewbox" and "width/height" SVG attributes and suitable parameters ... 8)
Specular wrote:... However we can see there are no explicit width/height properties defined, as the site didn't need it.
Actually, I believe they DID need to include whatever code is required to allow resizing;
as it stands, their picture displays unreadable text in ANY browser, NON-scalable to boot; shoddy workmanship, if you ask me... :roll:

(Wouldn't sign for any bandwidth capacity on their cable till they fixed that... :P )

Post Reply