Inkscape.org
Beginners' Questions Reducing file size when using Clip on raster images, or alternative method?
  1. #1
    jsm jsm @jsm

    It's very easy and fast just importing raster images, clipping it according to a drawn object. Doing this multiple times in a design results in the exported PNG file size being about 12 MB, while it would have been about 2 MB with the same canvas size/dpi without raster cutouts.

    Does it retain the whole intact raster image embedded when exported as PNG, like with PDF?

    Is it possible converting the resulting "Image" (from the clip) to something smaller?

    Is there some method as simple as this that results in a smaller export?

  2. #2
    Freezr Freezr @freezr
    *

    It is nearly impossible... If you are exporting an image in PNG it will weight accordingly with the size, the resolution and amount of colors in use. PNG compresses quite well images with a reduced set of flat colors whereas pictures are quite heavy in weight. You can squeeze up the weight of PNG file using some compression tools like Trimage for Linux or Imageoptim for macOS.

  3. #3
    Kirstie Kirstie @Kirstie🌷

    Hi. If you use smaller raster images to import in the first place, that helps keeping the svg file small.

    When exporting as a png, the exported file will be as big as you tell it to be. For example to print, use 300 ppi, but for onscreen use, 96 ppi is enough. There will be no embedded images in a png file like with a pdf, it is more like a flattened image.

    I also use Gimp to make these png's smaller for use online. But that is a different program.

  4. #4
    taylors8 taylors8 @taylors8

    If you've clipped a lot of your rastor image off, copy the clipped image to e.g. GIMP, then paste it back in (and delete out the original clipped rastor).  You're then left with only the clipped portion.
    Also, if you don't crop to image in GIMP, you still have the transparent edge around the rastor, and can more easily align to the original in Inkscape, before deleting that original.

  5. #5
    Tyler Durden Tyler Durden @TylerDurden

    @taylors8, might be easier to Alt+ B to make a bitmap in place, then delete the original clipped object.

    BTW, this topic is >2yrs old, and the OP has not been back since.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Reducing file size when using Clip on raster images, or alternative method?