0

I've got a Transparent PNG and want to put a 1px border around the visible part of the image.

When I try to add a Border in Gravit.io it puts the border around the outside of the rectangle (the whole png)

4
  • 2
    Never used Gravit.. but it appears to be a vector application. Typically vector apps see PNG files as one object and although the PNG may contain transparent pixels, it's the boundaries of the actual image (the outer rectangle) the vector app detects, and not the non-transparent pixels within those boundaries. At least this is true for Illustrator (and I believe Inkscape as well.)
    – Scott
    Commented Mar 6, 2022 at 18:27
  • 1
    @Scott - I agree. If it's a vector image editor, then it's likely not possible, at least not directly/automatically. It could be done very easily in a raster image editor such as Photoshop or GIMP though - then just export as PNG again.
    – Billy Kerr
    Commented Mar 6, 2022 at 19:13
  • Thanks, makes sense. What's confusing is that Gravit.io will see the edges of non-transparent pixels as the boundary for some things like "drop shadow" but not for others (like Border) Commented Mar 7, 2022 at 3:05
  • Illustrator's the same. I think it's because the basic under-the-hood process for drop shadows is to copy, rasterize, greyscale, blur, place below original object -- so the transparency is simply built into the rasterization step for shadows and glows.
    – Scott
    Commented Mar 7, 2022 at 3:23

1 Answer 1

0

Convert the PNG to a SVG with something like: https://png-to-svg.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.