PNG to STL — The Professional's Format for 3D Conversion

JPEG throws away data to save space. PNG preserves every single pixel exactly. When image quality directly determines the quality of your 3D print, you want lossless. But PNG offers more than just lossless compression — its alpha transparency channel enables cutout shapes impossible with JPEG, and its flexible bit depth lets you optimize for detail versus file size. If you are converting logos, icons, UI elements, or any image with sharp edges and transparency, PNG is not just better than JPEG — it is the only correct choice.

PNG Transparency: The Killer Feature for STL Conversion

JPEG cannot store transparency. Every JPEG is a solid rectangle, background included. PNG's alpha channel changes everything for 3D conversion.

How Alpha Maps to 3D Height

Our converter reads the alpha channel alongside the RGB channels. Fully transparent pixels (alpha = 0) map to zero height regardless of their RGB values. Fully opaque pixels map normally based on brightness. Partially transparent pixels (like soft edges or drop shadows) produce intermediate heights — creating a natural bevel effect along the edges of your subject. This means a PNG logo with a transparent background automatically becomes a standalone raised object with clean edges — no manual cropping or background removal needed.

Soft Transparency = Natural Bevels

If your PNG has soft edges (anti-aliased or feathered), the partial transparency creates a smooth ramp from zero height to full height. This produces beautiful beveled edges on your 3D model without any extra work. Use this intentionally: export logos with 2-3px feathering for professional-looking chamfered edges on the 3D print.

Hard Transparency = Vertical Walls

Binary transparency (completely transparent or completely opaque, no in-between) creates vertical walls at the edge of your subject. This is ideal for cookie cutters, stamps, and any application where you need a clean 90-degree edge. Export your PNG with "hard" or "aliased" edges if this is your goal.

Choosing the Right PNG Bit Depth for STL Conversion

Not all PNGs are created equal. The bit depth determines how many brightness levels are available for height mapping.

FormatBrightness LevelsBest Use CaseNotes
8-bit Grayscale256 levelsPhotos, reliefs, general useMost common. 256 levels is more than enough for FDM printing (0.2mm layer height). One shade maps to ~0.02mm height at 5mm scale.
8-bit RGBA256 levels + alphaLogos, icons, UI with transparencyThe standard for transparent design assets. Combine with soft alpha edges for automatic bevel effects.
16-bit Grayscale65,536 levelsScientific data, precise heightmaps, terrainOverkill for most users. The extra precision is not visible on FDM prints. Useful only for resin prints at 0.01mm layer height or for archival data.
24-bit RGB~256 perceived levelsColor photos, screenshots, web imagesConverted to grayscale using luminance formula. Color accuracy is lost but brightness relationships are preserved.

The Design Asset to 3D Print Pipeline

Most PNG-to-STL conversions come from design tools — Illustrator, Figma, Photoshop, Canva. Here is how to export correctly from each.

Adobe Illustrator / Photoshop

Export: File → Export → Export As → PNG. Critical settings: Check "Transparency" (this is the whole point of using PNG). Resolution: 300 PPI minimum. Anti-aliasing: Art Optimized for smooth edges (creates natural bevels) or None for hard edges (creates vertical walls). Do not: use "Save for Web (Legacy)" — it may convert to 8-bit with reduced color, introducing banding in the heightmap.

Figma

Select your frame or object. Export panel: Format = PNG, check "Transparent background" if needed. Scale: 2x or 3x to export at higher resolution. Figma exports at screen resolution by default (72 PPI equivalent), which is too low for detailed heightmaps. A 2x export of a 100px icon gives you 200px to work with. Tip: Group your design elements and export the group as a single PNG rather than exporting individual pieces.

Canva / Other Web Tools

Download → PNG, check "Transparent background." Limitation: Web-based design tools often export at fixed resolutions. For best results, work at the largest canvas size the tool allows. A 2000x2000px canvas exported as PNG will convert to STL much better than a 500x500px canvas. If transparency export is not available, use a solid contrasting background color and remove it later, or switch to SVG to STL which supports vector export directly.

Color Profiles: sRGB vs Adobe RGB vs P3

The color space of your PNG affects how colors convert to grayscale brightness values — and therefore the heights in your STL.

sRGB (Standard) — The Safe Default

All web browsers and most design tools use sRGB. If you are unsure what color profile your PNG uses, it is almost certainly sRGB. This is the recommended profile for STL conversion. Our tool reads the PNG pixel data directly and does not perform color management, so the conversion is profile-agnostic — but the visual preview on your screen may not match the heightmap if your monitor uses a different profile. Export your PNG with the sRGB profile embedded for the most predictable results.

Adobe RGB and DCI-P3 — Wider Gamut, Potential Confusion

These profiles cover more colors than sRGB. A bright red in Adobe RGB may be more saturated than the same RGB values in sRGB. Implication for heightmaps: the perceived brightness of colors differs between profiles. A green that looks bright in Adobe RGB may convert to a surprisingly dark gray in the heightmap because the underlying RGB values are lower than expected. Recommendation: convert wide-gamut PNGs to sRGB before uploading. The conversion is lossless for colors that exist in both spaces.

Grayscale and Gamma

A grayscale PNG stores only brightness values with no color information. However, gamma encoding (typically 2.2) means the stored values are not linear. Middle gray (50% perceived brightness) is stored as approximately 187 (not 128) in an 8-bit PNG. Our heightmap algorithm accounts for gamma encoding and linearizes the values before mapping to height, so the relief accurately reflects perceived brightness. If you create custom grayscale heightmaps in external software, save them as linear (gamma 1.0) to bypass this conversion and get direct 1:1 value-to-height mapping.

Resolution Math: How Many Pixels Do You Need?

The relationship between PNG resolution, print size, and visible detail follows a simple formula.

The Key Numbers

A standard 0.4mm nozzle FDM printer lays down lines ~0.4mm wide. The smallest detail it can reproduce in the XY plane is about 0.4mm. Your image needs at least one pixel per 0.4mm of print width for the heightmap to not be the limiting factor. Formula: Pixels needed = (print width in mm) / 0.4. For a 100mm-wide print, you need at least 250 pixels. A 512px source image supports prints up to 200mm wide before the pixel grid becomes visible. For a 50mm keychain, 128px is sufficient. For resin printers (0.05mm resolution), you need 20x more pixels: a 100mm print at 0.05mm resolution needs 2000 pixels — our 512px processing limit becomes the bottleneck. For high-resolution resin prints, use an external tool that supports higher pixel counts.

Advanced Transparency Techniques

Gradient Transparency for Contoured Bases

Instead of a binary transparent/opaque edge, create a radial gradient from opaque (center) to transparent (edge). This produces a dome-like base that rises smoothly from the print bed to your subject. How to create: In Photoshop or GIMP, add a layer mask to your subject layer. Apply a radial gradient from white (opaque, center) to black (transparent, edge). Export as PNG with transparency. The gradient creates a smooth height ramp in the STL — no sharp base edge.

Multi-Object Transparency for Independent Heights

Place multiple objects in one PNG at different opacity levels. A fully opaque object = full height. A 50% opaque object = half height. A 25% opaque object = quarter height. This gives you independent height control for each element in a single conversion. Create each object on its own layer, set the layer opacity, and export as a single PNG. The alpha values translate directly to height levels. This technique lets you design multi-level reliefs in any graphics software.

PNG to STL Questions

When should I use PNG instead of JPG for STL conversion?
Use PNG when: your image has transparency, sharp edges (logos, text, icons), you plan to edit and re-save, or you need the absolute best quality. JPG is acceptable when: you are converting a photo directly from your camera, the image has no transparency, and quality-90+ JPEG compression is acceptable. Rule of thumb: if you created it in a design tool, export as PNG. If you photographed it, the original JPG is fine.
What happens if my PNG has a white background instead of transparency?
A solid white background (RGB 255,255,255) maps to maximum height in the heightmap. This means your subject will be at the same height level as the background — producing a rectangular block instead of a cutout shape. Always remove the background and export with transparency if you want the subject to stand alone. If your PNG must have a background, use pure black (height = 0) to make the subject raised above it.
Does PNG compression level affect STL quality?
No. PNG compression is completely lossless regardless of the compression level. Level 0 (no compression) and level 9 (maximum compression) produce identical pixel data — they just take different amounts of time to compress and decompress. The STL output will be identical. Choose whatever compression level is convenient; the conversion quality does not change.
Can I use a PNG with a drop shadow or glow effect?
Yes, but be aware that shadows and glows in the PNG image will become physical height variations in the STL. A soft drop shadow will produce a sloping surface around your subject. This can look great (like a natural base) or terrible (like a messy blob) depending on your intent. For clean extrusions, disable all effects before export. For artistic reliefs, effects can add interesting depth. The transparency workflow described above applies here too.
My transparent PNG produces a flat disc instead of a raised shape. Why?
This usually happens when the subject in your PNG is very light (near white) and the transparent area maps to zero height while the light subject maps to maximum height — but the brightness difference is too small to notice. Fix: increase the height scale, or convert the subject to a darker color before export. A mid-gray subject on a transparent background will produce a much more visible relief than a white subject on transparency.

PNG is ideal for design assets. For vector graphics, SVG extrusion produces even sharper results. For photos, JPG is the native format.