Generated by GPT-5-mini| Scour (software) | |
|---|---|
| Name | Scour |
| Programming language | Python |
| Operating system | Cross-platform |
| Genre | Raster-to-vector conversion, vectorization |
| License | GPL |
Scour (software) is an open-source vectorization and SVG optimization utility written in Python that reduces file size and simplifies Scalable Vector Graphics files. It targets workflows involving Inkscape, GIMP, ImageMagick, Adobe Illustrator, and Scribus by providing command-line and programmatic tools for cleaning, compressing, and sanitizing SVG content. Scour is used in contexts ranging from web publishing with Apache HTTP Server and NGINX to digital preservation projects associated with institutions like the Internet Archive.
Scour operates as a command-line filter and library for processing Scalable Vector Graphics files to remove redundant data, inline resources, and normalize structure for consumption by applications such as Chromium, Mozilla Firefox, Safari, and Microsoft Edge. It integrates with desktop publishing pipelines involving LaTeX toolchains, LibreOffice, and Scribus templates, and is frequently invoked via automation systems like Jenkins (software), Travis CI, and GitHub Actions. Developers embed Scour into build systems using package managers including pip (package manager), APT, and Homebrew to obtain consistent, minimized SVG assets for use in projects such as WordPress, Drupal, and Joomla! themes.
Scour provides features including attribute pruning, style consolidation, path simplification, and removal of metadata such as EXIF inserted by tools like Adobe Photoshop or GIMP. It performs ID deduplication compatible with SVG use inside HTML5 and React component trees, and can compress coordinate precision for use with WebGL and Canvas API rendering in frameworks like Three.js and D3.js. The utility supports options for preserving accessibility annotations used by WAI-ARIA and integrates with continuous integration for icon optimization in Font Awesome and Material Design workflows. Scour's command-line switches mirror functionality expected by users of rsvg-convert and svgo, offering transformations that work in conjunction with Ghostscript-based PDF pipelines and Pandoc conversions.
Implemented in Python, Scour parses SVG XML trees using libraries that interoperate with lxml and ElementTree, then applies deterministic rewrite rules influenced by best practices from W3C and the SVG Tiny and SVG 1.1 specifications. The codebase separates tokenization, AST transformation, and serialization phases to enable unit testing with frameworks like pytest and unittest (Python) while facilitating integration into Docker containers and Virtualenv environments. Scour's modular design allows embedding as a library or running as a standalone script; backends for I/O use abstractions compatible with POSIX file models and cloud storage adapters for platforms such as Amazon S3, Google Cloud Storage, and Microsoft Azure.
Scour was conceived to address inefficiencies in SVG output from vector editors such as Inkscape and Adobe Illustrator and to improve web performance metrics tracked in initiatives like Google PageSpeed Insights and WebPageTest. Contributions have come from individual maintainers and contributors familiar with Python Software Foundation practices, and the project has been discussed on mailing lists and platforms including GitHub and SourceForge. Over time, Scour incorporated ideas from contemporaneous projects like svgo and toolchains used by Mozilla and Wikimedia Foundation for icon optimization, evolving through community-driven pull requests, issue triage, and feature proposals aligned with recommendations from the WHATWG and W3C.
Scour is distributed under the GNU General Public License (GPL), enabling redistribution and modification under copyleft terms and making it suitable for inclusion in free software stacks managed by distributions such as Debian, Ubuntu, Fedora, and Arch Linux. Binary packaging and source releases are available through channels like PyPI for pip installation, and maintainers supply packaging recipes for Homebrew taps and Chocolatey for Windows. The GPL status has informed how Scour integrates with proprietary toolchains in enterprises and with projects governed by licenses like the MIT License and Apache License.
Scour has been adopted by developers, designers, and organizations seeking to reduce SVG payloads for web applications, responsive design projects, and digital publishing platforms such as WordPress and Drupal. It is cited in performance optimization guides produced by entities like Google and Mozilla and appears in tooling lists alongside svgo, rsvg-convert, and ImageMagick for asset pipelines used by startups, media outlets, and academic repositories including the Internet Archive and university digital libraries. Reviews emphasize Scour's scriptability for automation with Ansible, Chef (software), and Puppet as well as its compatibility with content delivery networks operated by Cloudflare and Akamai Technologies.
Category:Free software Category:Vector graphics software