1

I am looking for a program that can test if a SVG file contains some raster graphics elements. Linux or Windows, CLI or GUI, and gratis if possible.

1
  • To test a few files or automatically batch test hundreds or thousands of them?
    – OuzoPower
    Dec 7, 2017 at 17:51

1 Answer 1

1

You could modify the program suggested here as follows:

using System;

namespace ExtractBitmapFromSvg
{
    static class ExtractBitmapFromSvg
    {
        static int Main(string[] args)
        {
            var svgFile = new SvgFile(args[0]);
            var images = svgFile.GetEmbeddedImages();
            var hasImages = images.Count > 0;
            Console.WriteLine(hasImages ? "images found" : "no images");
            return hasImages ? 1 : 0;
        }
    }
}

Note that it's incomplete and does not identify all raster graphic types yet.

0

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.