By Relwick · Published
The centre of a diagram looks correct, but part of its outer border disappears in the exported image. This can be a geometry or clipping problem rather than inadequate resolution.
A larger output cannot recover a region the rendering process was instructed to exclude.
Quick answer & key takeaways
A stroke, marker, or effect can extend beyond the artwork’s export area, and SVG clipping rules can hide that painted region. Increasing the PNG or JPG dimensions may only enlarge the same clipped view. Inspect the source SVG and its export bounds, correct the artwork or page in an appropriate editor, then rasterise again and compare all edges with the intended design.
- Inspect the painted extent, not just the shape’s centre line.
- Export bounds and clipping rules can remove edge content.
- Correct the source before making a larger raster copy.
Find the first clipped version
Compare the editable artwork, its SVG export, and the final raster image. If the exported SVG already clips the border in a normal view, changing JPEG quality later is addressing the wrong stage.
Look at every outer edge, including arrowheads, rounded corners, and labels positioned close to the page boundary. A line’s mathematical path and the complete painted stroke do not necessarily occupy the same area.
Check bounds and clipping together
The SVG specification describes how viewport clipping depends on overflow and other clipping rules. The viewBox establishes a coordinate mapping; it should not be treated as a universal promise that every painted effect will be included in every embedding or export context.
| Visible symptom | Source-level inspection |
|---|---|
| Half of an outside border is missing | Check whether its stroke extends beyond the export area. |
| An arrow tip disappears | Inspect marker extent and any local clipping. |
| Only one group is cut off | Review that group’s clipping path or mask. |
| A shadow ends abruptly | Check the effect’s bounds and export support. |
These are diagnostic possibilities, not proof of one cause. An unsupported feature or a difference between renderers can also change the result. Compare a simple reproduction before editing complex artwork blindly.
Export and review the result
Image compressor accepts supported restricted SVG input and renders it before preparing the image. It does not offer a vector-artboard or clipping-path editor. Its later size controls should not be expected to repair content excluded during the initial render.
After fixing the source, compare the new output with the intended artwork at its final dimensions. Check all four edges and any nearby text. Then review format, transparency, and byte requirements separately.
Frequently asked questions
Will a higher resolution restore a clipped arrowhead?
Not when clipping excludes it from the rendered area. Correct the relevant source bounds or clipping first.
Does viewBox always crop exactly like an image rectangle?
No. Coordinate mapping and clipping behaviour must be considered with the SVG’s viewport and rendering context.
Can the compressor edit an SVG clipping path?
No. Use an appropriate vector editor for authorised source corrections.
Sources and further reading
- W3C: SVG rendering model and overflow — Defines viewport clipping behaviour, including the effect of overflow settings.
Summary
Find where the edge disappears, correct that stage, and render again. More pixels improve sampling only after the intended artwork is actually included.