Inkscape.org
Beyond the Basics How to pad an image with pixels (Blank space)
  1. #1
    ILikeArt ILikeArt @ILikeArt

    Suppose I create an image of a Lady Bug. How do I pad this image with empty spaces(Meaning pixels) , on or before I export it to a single file using Inkscape?

     

    For example suppose that I want the image to be centered, and that I want each side of the image padded with 8 blank pixels on each side. The image will be centered in the middle,

    and the image will be 100 X 100 pixels in size. The 100 X 100 square includes the image and the transparent pixels which pad the image.

  2. #2
    Grobe Grobe @Grobe

    one method that works for me - had similar question because of the printers limitation on how far to the edge it can print.

    Start with the 100x100 px image. Make sure both tools measuring unit and page measuring unit set to pixels (not mm or inches).

    Then you can either create 4 separate squares measuring 8x8 pixels, and align them to each corner facing inward. Then insert guides at the inward corners.

    After that, import image file - then manually resize to make it snap the image to the guides.

  3. #3
    Tyler Durden Tyler Durden @TylerDurden
    *

    If you know the final image size (100x100), maybe this:


    Then, scale the artwork inside the guides as Grobe has described.

  4. #4
    Tyler Durden Tyler Durden @TylerDurden
    *

    If you have an arbitrary size object and want to add page margins (eg 8px) around it, maybe this:

    This creates a page based on the object size, not sizing the object to fit a fixed page size.

  5. #5
    ILikeArt ILikeArt @ILikeArt

    Ok, thanks all !

  6. #6
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Select tool [s]. In the tool control bar, set the measurement unit to [px]. 

    Select your shape. In my case the tool control bar shows the position as [X: 110] and [Y: 397]

    Duplicate [ctrl+d]. In the tool control bar, set [X: 110+8] and [Y: 397+8].

    Select the original shape again. Duplicate again [ctrl+d]. In the tool control bar, set [X: 110-8] and [Y: 397-8].

    Select everything [ctrl+a]. Reset the page size [shift+ctrl+r] or [File > Document Properties...] [Display] [Resize to content: Yes].

    Delete the two duplicate shapes and export the page.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics How to pad an image with pixels (Blank space)