Advertisement


Add perspective to Bitmap in Inkscape


Question

I have a 3D monitor drawn in Inkscape and I'd like to add a screenshot into the region. I have tried to skew, but the shape is too irregular. I have also tried to apply an envelope (Extensions -> Modify Path -> Envelope), but it seems not to work with Bitmaps.

Adding a screenshot to a monitor

How can I get the screenshot to appear like drawn on the screen?

2014/07/29
1
12
7/29/2014 8:22:00 AM

Accepted Answer

Perspective or envelope deformation of embedded bitmaps objects is not (yet) defined in the SVG specifications. Therefore we can not do this with Inkscape.

To overcome this we have two options only.

  1. Deform the bitmap to appropriate geometry prior to embedding using an external bitmap graphics tool.

  2. Tracing the bitmap to vector to then be able to use envelope or perspecitive path deformation.

    These are the steps involved for using the envelope tool:

    • Embed bitmap image and select it.
    • Path > Trace bitmap using sensible settings for acceptable results.
    • Object > ungroup the traced vectors.
    • Transform both, the destination, and the traced bitmap to paths with Path > Object to Path.
    • Select source objects, then destination object.
    • Switch to Edit Path by nodes mode F2.
    • Apply Extensions > Modify Path > Envelope (or Perspective for rectangles).
    • wait...

    After that we have a traced bitmap with correct perspective view embedded in our destination object:

enter image description here enter image description here

As we can see this is a quite time consuming, computer memory, and processor demanding task. We may be better off to perform the deformation of the bitmap outside of Inkscape prior to embedding.

2014/07/30
9
7/30/2014 7:27:00 PM