How to use
- Open icon-40x20.svg.
- Compare quality 80 and quality 60.
- Expect 40 by 20 because those are the SVG attributes.
Formula / how it works
icon-40x20.svg declares width 40 and height 20 and fills the rectangle with #cc2222. Quality 80 and quality 60 both produce a 40 by 20 JPEG of about 0.8 KB. The flat red hides the quality difference. A drawing with fine lines will not. Transparent SVG pixels would be painted white, because JPEG has no alpha. This file is opaque. createImageBitmap would not decode the SVG. The page loads it as an image, then draws it. An SVG with only a viewBox and no pixel size can measure as 0 and is refused. This is not a tracer. Vectors become pixels at the size the file states.
Forty by twenty is the SVG, not a guess. Both qualities were about 0.8 KB because the rectangle is flat red. Fine lines will separate 80 from 60. A zero measured size is refused. Transparent paint becomes white. The SVG stays editable. The JPEG is the raster copy.
Forty by twenty comes from the SVG attributes, and both qualities were about 0.8 KB because the rectangle is flat red. Fine lines will separate quality 80 from quality 60. A measured size of zero is refused instead of an invented canvas. Transparent SVG paint becomes white. The SVG stays the editable file. The JPEG is only the raster copy.
The red rectangle is 40 by 20 because the SVG says so, and both qualities were about 0.8 KB because there is no texture. A map or a logo with thin strokes will show quality 60 as softer than quality 80. Transparent paint becomes white. A file with no pixel width is refused rather than stretched to a default the page invented. The SVG remains the file you can still edit. The JPEG is only a picture of it. Nothing is uploaded.
Use the SVG when you still need to change the drawing. Use the JPEG when you need a picture at 40 by 20. Both qualities were about 0.8 KB on this flat red rectangle, so they do not teach you about thin lines. Try quality 80 and 60 on a drawing with strokes before you pick one. Holes become white. A missing pixel size is an error, not a default canvas.
Work in this order. Confirm the SVG has width and height in pixels. icon-40x20.svg does, so the JPEG is 40 by 20. Compare quality 80 and quality 60. On this flat red rectangle both were about 0.8 KB, which means the slider had little to do. On a drawing with thin lines the lower quality goes soft. Transparent areas become white. A file that measures as zero pixels is refused. The SVG remains the editable source. The JPEG is a picture of it, useful in a tool that cannot read SVG, and it is not uploaded anywhere while you make it.
A PNG of the same SVG is SVG to PNG.
Worked examples
Red SVG at quality 80
Inputs: s2j-f: icon-40x20.svg | s2j-q: 80
On this page, take icon-40x20.svg, then 80 and press Convert to JPG. The JPEG is the SVG width and height, with holes painted white.
Result: SVG to JPEG: 40×20. If a pixel was transparent, it is now white. 0.8 KB
Red SVG at quality 60
Inputs: s2j-f: icon-40x20.svg | s2j-q: 60
On this page, take icon-40x20.svg, then 60 and press Convert to JPG. The JPEG is the SVG width and height, with holes painted white.
Result: SVG to JPEG: 40×20. If a pixel was transparent, it is now white. 0.8 KB
Use cases
- A JPEG of a simple SVG icon.
- Refusing an SVG with no pixel size.
- Painting transparent SVG pixels white.
- Not tracing a photo.
Tips & limitations
- Both qualities were about 0.8 KB on this flat red.
- Fine lines will show the quality gap.
- Width and height attributes are required.
- The SVG stays on disk.
FAQ
Why 40 by 20?
The SVG says width 40 and height 20.
Did quality 60 change the size?
Not on this flat rectangle. Both were about 0.8 KB.
Where does transparency go?
Onto white.
Does this trace a photo?
No. Vectors become pixels.
What if there is no width?
A zero measured size is refused.
Is the SVG uploaded?
No.
40 by 20 and 0.8 KB describe icon-40x20.svg. A detailed drawing will not match that file size.