Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
ImageGraphics
  • See Also
    • ImageMesh
    • Image
    • Graphics
    • Rasterize
    • ColorQuantize
    • DominantColors
  • Related Guides
    • Computer Vision
    • Image Computation: Update History
    • Machine Learning
    • See Also
      • ImageMesh
      • Image
      • Graphics
      • Rasterize
      • ColorQuantize
      • DominantColors
    • Related Guides
      • Computer Vision
      • Image Computation: Update History
      • Machine Learning

ImageGraphics[image]

returns the content of image in the form of scalable vector graphics.

ImageGraphics[image,n]

uses up to n colors for the vector graphics.

ImageGraphics[image,colors]

creates vector graphics containing the specified colors.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
Method  
MinColorDistance  
DistanceFunction  
Applications  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ImageMesh
    • Image
    • Graphics
    • Rasterize
    • ColorQuantize
    • DominantColors
  • Related Guides
    • Computer Vision
    • Image Computation: Update History
    • Machine Learning
    • See Also
      • ImageMesh
      • Image
      • Graphics
      • Rasterize
      • ColorQuantize
      • DominantColors
    • Related Guides
      • Computer Vision
      • Image Computation: Update History
      • Machine Learning

ImageGraphics

ImageGraphics[image]

returns the content of image in the form of scalable vector graphics.

ImageGraphics[image,n]

uses up to n colors for the vector graphics.

ImageGraphics[image,colors]

creates vector graphics containing the specified colors.

Details and Options

  • ImageGraphics is also known as image vectorization or auto tracing.
  • ImageGraphics works with arbitrary 2D images and returns a Graphics object.
  • ImageGraphics has the same options as Graphics, with the following changes and additions: [List of all options]
  • DistanceFunction Automaticany distance supported in ColorDistance
    Method Automaticmethod to determine color segment contours
    MinColorDistance Automaticminimum color distance
  • Possible settings for Method include:
  • "Exact"exact representation of the contour
    "LinearSeparable"approximate contour by local linear separation
    {"LinearSeparable",α}merge and smooth segments with direction changes smaller than α
    "MarchingSquares"contour computed using marching squares
    "DualMarchingSquares"contour computed using dual marching squares
  • List of all options

    • AlignmentPointCenterthe default point in the graphic to align with
      AspectRatioAutomaticratio of height to width
      AxesFalsewhether to draw axes
      AxesLabelNoneaxes labels
      AxesOriginAutomaticwhere axes should cross
      AxesStyle{}style specifications for the axes
      BackgroundNonebackground color for the plot
      BaselinePositionAutomatichow to align with a surrounding text baseline
      BaseStyle{}base style specifications for the graphic
      ContentSelectableAutomaticwhether to allow contents to be selected
      CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
      DistanceFunctionAutomaticany distance supported in ColorDistance
      Epilog{}primitives rendered after the main plot
      FormatTypeTraditionalFormthe default format type for text
      FrameFalsewhether to put a frame around the plot
      FrameLabelNoneframe labels
      FrameStyle{}style specifications for the frame
      FrameTicksAutomaticframe ticks
      FrameTicksStyle{}style specifications for frame ticks
      GridLinesNonegrid lines to draw
      GridLinesStyle{}style specifications for grid lines
      ImageMargins0.the margins to leave around the graphic
      ImagePaddingAllwhat extra padding to allow for labels etc.
      ImageSizeAutomaticthe absolute size at which to render the graphic
      LabelStyle{}style specifications for labels
      MethodAutomaticmethod to determine color segment contours
      MinColorDistanceAutomaticminimum color distance
      PlotLabelNonean overall label for the plot
      PlotRangeAllrange of values to include
      PlotRangeClippingFalsewhether to clip at the plot range
      PlotRangePaddingAutomatichow much to pad the range of values
      PlotRegionAutomaticthe final display region to be filled
      PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
      Prolog{}primitives rendered before the main plot
      RotateLabelTruewhether to rotate y labels on the frame
      TicksAutomaticaxes ticks
      TicksStyle{}style specifications for axes ticks

Examples

open all close all

Basic Examples  (2)

Convert a color image into vector graphics:

Convert a natural image to vector graphics using 8 colors:

Scope  (3)

Convert a bitmap of a digit to vector graphics:

Convert a grayscale image to vector graphics:

By default, an automatic color quantization is performed:

Specify the number of colors to use:

Specify the explicit colors to use in the vector graphics:

Options  (3)

Method  (1)

Exact segment contours:

Simplified contours by connecting linearly separable segments:

Smooth contours by rounding corners of less than 90° with Bézier splines:

Use marching squares:

Use dual marching squares:

MinColorDistance  (1)

By default, the minimum color distance is automatically chosen:

Specify a minimum color distance:

Smaller value for color distance results in more colors:

DistanceFunction  (1)

The color metric defined by DistanceFunction influences the image segmentation:

Applications  (4)

Create an outline image:

Simplify color regions using mean-shift and smooth outlines via curvature flow filter:

Convert to vector graphics:

Successively simplify the color regions of an image with a mean-shift filter:

Generate vector graphic maps. Import a pixel-based map of the Rocky Mountains near Denver:

Delete county borders:

Convert colored elevation map into graphic contours:

Perform vector graphic operations introducing contour lines and changing colors:

Transform the map without altering line thickness:

Compare the result with the corresponding pixel-based transformation:

Creating a scalable icon of a kingfisher:

Obtain a rough mask:

Refine the mask with the grow-cut algorithm:

Regularize the color segments via curvature flow:

Cover the background with green:

Select the dominant colors of the bird and add green as the background color:

Generate a vector graphic:

Remove the green background segment:

Insert the expression into a larger graphic to obtain a scalable icon:

Properties & Relations  (3)

Typically, the scalable graphics version of the image is much smaller in byte count:

ImageGraphics returns color segments similar to color quantization in the LAB color space:

Segment and select shapes:

Colorize the segmented image:

Convert the image into vector graphics. Double-click to select and move a segment

Possible Issues  (6)

"MarchingSquares" and "DualMarchingSquares" introduce gaps at T-junctions:

Segment edges in the resulting graphic are not colored:

Colorize the edges by providing explicit FaceForm and EdgeForm specifications:

Lines and curves of one-pixel thickness may not be detected correctly:

Make the lines thicker for a better conversion:

If the minimum color distance is larger than the image color variation, the output may be of a single color:

Lower the color distance:

Segments touching across pixel corners are connected:

Use Method"MarchingSquares" to keep segments separated:

A low-resolution image may cause some pixelation artifacts:

Some of that artifact may be removed after image upsampling:

Alternatively, use a high-resolution image:

See Also

ImageMesh  Image  Graphics  Rasterize  ColorQuantize  DominantColors

Related Guides

    ▪
  • Computer Vision
  • ▪
  • Image Computation: Update History
  • ▪
  • Machine Learning

History

Introduced in 2017 (11.1) | Updated in 2018 (11.3)

Wolfram Research (2017), ImageGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageGraphics.html (updated 2018).

Text

Wolfram Research (2017), ImageGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageGraphics.html (updated 2018).

CMS

Wolfram Language. 2017. "ImageGraphics." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/ImageGraphics.html.

APA

Wolfram Language. (2017). ImageGraphics. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageGraphics.html

BibTeX

@misc{reference.wolfram_2025_imagegraphics, author="Wolfram Research", title="{ImageGraphics}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/ImageGraphics.html}", note=[Accessed: 01-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_imagegraphics, organization={Wolfram Research}, title={ImageGraphics}, year={2018}, url={https://reference.wolfram.com/language/ref/ImageGraphics.html}, note=[Accessed: 01-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English