SVG Image Format: Possible Integration Into PF Whiteboard?

  • Thread starter SlowThinker
  • Start date
In summary, the conversation discusses the difficulties of drawing and posting images on mobile devices and the suggestion of implementing SVG support as an image format on the forums. There is also a mention of using LaTeX for images, but it is not currently supported. The potential security concerns of allowing SVG tags are also brought up.
  • #1
SlowThinker
474
65
Hello.
I access the forums from iPad or Android, and it's really hard to draw images on them. The apps are less than awesome, and most online editors (including PF whiteboard) require Flash support, which is not available on mobile devices. Javascript online editors often don't work.
When they do, I draw something and try to download the image, I get things like

data:text/plain;charset=utf-8;base64,PHN2Zy...vc3ZnPg==

instead of the image, and it can't be used as URL in Upload.

So I came up with the idea that SVG images can be written in a text editor. Some online editors even allow you to draw and then copy the SVG as text. Would it be possible to
1) Add SVG as the supported image format?
2) Add to Upload button a possibility to create a new file with contents of an edit box? This is a trivial task on a computer, but mobile devices are really limited in these things.
3) Integrate SVG into the post, such as
[SVG="400,300"]
<path d="M0 0 q 150 50 300 0" stroke="black" fill="none"/>
<path d="M0 250 q 150 50 300 0" stroke="black" fill="none"/>
[/SVG]
or similar? I see there is a chance for the SVG to be malformed, so you can't just plug it into the text, but it would be nice if possible.
 
Physics news on Phys.org
  • #2
I can investigate more, but until then, just how many people know SVG code and would use it?
 
  • #3
Greg Bernhardt said:
I can investigate more, but until then, just how many people know SVG code and would use it?
If you ask me, I can only say that it's much simpler than LaTeX.
Finding a good online SVG editor seems hard, but this is not really a choice between good and bad pictures, it's between being able or unable to post pictures at all.
What are people using to draw pictures like this one? Is there some favorite scientific picture editor?

rindler-observer-measuring-c-png.90028.png
 
  • #4
SlowThinker said:
If you ask me, I can only say that it's much simpler than LaTeX.
Finding a good online SVG editor seems hard, but this is not really a choice between good and bad pictures, it's between being able or unable to post pictures at all.
What are people using to draw pictures like this one? Is there some favorite scientific picture editor?

rindler-observer-measuring-c-png.90028.png
I drew this with Inkscape* -- a free SVG editor! -- and exported as a PNG bitmap. With SVG support I could have uploaded the SVG file itself. Note, however, that the SVG file was 554 KB whereas the PNG was only 48 KB.

In the past not all browsers had native support for SVG, but that may have changed.*Well, actually MATLAB drew the pink gridlines for me, and with an SVG add-on exported an SVG file that I then tweaked with Inkscape.
 
  • #6
DrGreg said:
Note, however, that the SVG file was 554 KB whereas the PNG was only 48 KB.

Some simple SVG files might be smaller than their png rasterizations. One feature that would be worth exploring is an interactive SVG file.
 
  • #7
I believe that simply enabling .SVG as the extension for uploaded images wouldn't hurt anyone. SVG is not that new, pretty much all browsers support it well.
I see that adding a textbox to the upload dialog would leave some people scratching their heads; OTOH the members of this forum are probably educated enough to understand its purpose.
Clearly, implementing the [SVG] tag is a lot of work for just a few people, I can understand that.

Do the ##\LaTeX## pictures still work? I tried it but couldn't make any image.
 
  • #8
SlowThinker said:
Do the ##\LaTeX## pictures still work? I tried it but couldn't make any image.
Nope. MathJax doesn't seem to support the picture environment.
 
  • #9
This isn't simple because we'd essentially be allowing for members to post arbitrary HTML and SVG can also embed javascript. You can imagine the security issues. To allow only SVG tags would require substantial custom work.
 
  • Like
Likes mheslep and dlgoff

Related to SVG Image Format: Possible Integration Into PF Whiteboard?

1. What is an SVG image format?

SVG stands for Scalable Vector Graphics, which is a file format used for vector images. Unlike raster images, which are made up of pixels, SVG images are made up of mathematical equations that allow them to be scaled up or down without losing quality.

2. How can SVG images be integrated into PF Whiteboard?

SVG images can be easily integrated into PF Whiteboard by using the "Insert Image" feature and selecting the SVG file from your computer. They can also be copied and pasted directly into the whiteboard.

3. Why would I want to use SVG images in PF Whiteboard?

SVG images are useful in PF Whiteboard because they are scalable, meaning they can be resized without losing quality. This is especially helpful when creating diagrams or charts that need to be adjusted to fit the space on the whiteboard.

4. Can I edit SVG images in PF Whiteboard?

Yes, you can edit SVG images in PF Whiteboard. The whiteboard has a built-in SVG editor that allows you to make changes to the image, such as adding text or shapes, changing colors, and resizing elements.

5. Are there any limitations to using SVG images in PF Whiteboard?

One potential limitation is that not all browsers support SVG images, so if you are using PF Whiteboard on a browser that does not support SVG, the images may not appear correctly. Additionally, some complex SVG images may not be editable in the whiteboard's built-in editor.

Similar threads

Replies
8
Views
1K
  • Sticky
  • Engineering and Comp Sci Homework Help
Replies
1
Views
19K
  • Sticky
  • Biology and Chemistry Homework Help
Replies
1
Views
15K
  • Sticky
  • Calculus and Beyond Homework Help
Replies
1
Views
22K
  • Sticky
  • Precalculus Mathematics Homework Help
Replies
1
Views
18K
  • Sticky
  • Advanced Physics Homework Help
Replies
1
Views
25K
  • Sticky
  • Introductory Physics Homework Help
Replies
2
Views
64K
Replies
4
Views
3K
  • Computing and Technology
Replies
1
Views
7K
  • General Discussion
Replies
2
Views
3K
Back
Top