Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • 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

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

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
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • 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
Rasterize
  • See Also
    • Image
    • Export
    • ExportString
    • Graphics
    • Magnify
    • Rotate
    • Antialiasing
    • CurrentNotebookImage
    • CurrentScreenImage
    • WebImage
  • Related Guides
    • Graphics Transformations
    • Image Computation: Update History
    • Image Processing & Analysis
    • Creating & Importing Images
    • Tuning & Debugging
  • Workflows
    • Combine Multiple Images
    • See Also
      • Image
      • Export
      • ExportString
      • Graphics
      • Magnify
      • Rotate
      • Antialiasing
      • CurrentNotebookImage
      • CurrentScreenImage
      • WebImage
    • Related Guides
      • Graphics Transformations
      • Image Computation: Update History
      • Image Processing & Analysis
      • Creating & Importing Images
      • Tuning & Debugging
    • Workflows
      • Combine Multiple Images

Rasterize[expr]

returns a rasterized version of the displayed form of expr.

Rasterize[expr,elem]

gives the element elem associated with the rasterized form of expr.

Rasterize[expr,{elem1,elem2,…}]

gives a list of the specified elemi.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
Background  
ImageFormattingWidth  
ImageResolution  
ImageSize  
LightDark  
RasterSize  
Applications  
Properties & Relations  
Possible Issues  
Interactive Examples  
Neat Examples  
See Also
Related Guides
Related Workflows
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Image
    • Export
    • ExportString
    • Graphics
    • Magnify
    • Rotate
    • Antialiasing
    • CurrentNotebookImage
    • CurrentScreenImage
    • WebImage
  • Related Guides
    • Graphics Transformations
    • Image Computation: Update History
    • Image Processing & Analysis
    • Creating & Importing Images
    • Tuning & Debugging
  • Workflows
    • Combine Multiple Images
    • See Also
      • Image
      • Export
      • ExportString
      • Graphics
      • Magnify
      • Rotate
      • Antialiasing
      • CurrentNotebookImage
      • CurrentScreenImage
      • WebImage
    • Related Guides
      • Graphics Transformations
      • Image Computation: Update History
      • Image Processing & Analysis
      • Creating & Importing Images
      • Tuning & Debugging
    • Workflows
      • Combine Multiple Images

Rasterize

Rasterize[expr]

returns a rasterized version of the displayed form of expr.

Rasterize[expr,elem]

gives the element elem associated with the rasterized form of expr.

Rasterize[expr,{elem1,elem2,…}]

gives a list of the specified elemi.

Details and Options

  • The expression expr can be graphics, text, a cell, a notebook object or any other expression.
  • Rasterize[nb] gives a rasterized version of the complete content associated with the notebook object nb.
  • Possible basic elements that can be returned by Rasterize include:
  • "BoundingBox"bounding box information for the raster
    "Data"the array of pixel values in the raster
    "Graphics"a graphics object representing the raster
    "Image"an image object representing the raster
    "RasterSize"pixel width and height of the raster
    "Regions"regions specified by Annotation constructs
  • Rasterize[expr] is equivalent to Rasterize[expr,"Image"] and displays in a notebook in a way that approximates the unrasterized display of expr, with the same image size.
  • An expression displayed at a given size at the default screen resolution res will result in a raster of dimension .
  • The following options for Rasterize can be given:
  • Background Automaticbackground to use
    BaselinePositionAutomatichow to align with a surrounding text baseline
    ImageFormattingWidth $ImageFormattingWidthwrapping width for expressions to be rasterized
    ImageResolution $ImageResolutionimage resolution in dpi for rasterization
    ImageSize Automaticfinal displayed image size in printer's points
    LightDark Inheritedwhether to rasterize in light or dark mode
    RasterSize Automaticraster size in pixels for rasterization
  • RasterSize and ImageResolution determine the coarseness of rasterization; ImageSize determines the size at which the final image will be displayed.
  • If there is an explicit setting for RasterSize, it overrides any explicit setting for ImageResolution.
  • When the settings for RasterSize or ImageResolution are small, the graphic will appear coarse, and text may be illegible. There may also be artifacts associated with aliasing.
  • Settings for ImageSize and Background in Rasterize override any settings for those options in expr.
  • Background->None yields a raster with a transparent background.
  • If no explicit size or resolution option settings are given, Rasterize[expr,…] will rasterize expr at the size and resolution it would normally be displayed in a notebook.
  • Rasterize[expr,"RasterSize"] yields {w,h}, where w is the overall width in pixels of the raster, and h is its overall height.
  • Rasterize[expr,"BoundingBox"] yields {w,h,dh}, where w is the overall width, h is the overall height, and dh is the offset of the baseline of the contents of expr from the bottom of its bounding box.
  • Images generated by Rasterize can vary slightly from one computer system to another, mainly as a result of different fonts and anti-aliasing procedures.
  • The results from Rasterize[expr,"BoundingBox"] can depend on details of font metrics, which generally differ between different computer systems.
  • Rasterize[expr,"Regions"] gives a list of rules of the form {{a1,type1}->reg1,{a2,type2}->reg2,…}, where each rule {ai,typei}->regi is associated with an annotation of the form Annotation[expr,ai,typei] in expr, or with an object that is automatically recognized as an annotation, such as a Hyperlink or Tooltip. The regi give pixel positions in the form {{xmin,ymin},{xmax,ymax}}, where y coordinates run from top to bottom, mirroring the coords attribute of HTML.
  • The default setting of LightDarkInherited uses the default light-dark setting of the notebook running the evaluation. If the evaluation was not started from a specific notebook, it uses the default light-dark setting of the notebook front end.

Examples

open all close all

Basic Examples  (3)

Make a 15-pixel-wide rasterization of an image of a disk:

Make a 75-pixel-wide rasterization of text, and display it 200 pixels wide:

Make a 36 dpi rasterization of a 3D graphic with light yellow background:

Scope  (11)

Convert any Wolfram Language expression into a raster graphic:

The default output is a raster graphic:

Get the bounding box information:

Get the array of pixel values for the raster:

Get the raster graphic:

Get the pixel dimensions of the raster:

Get both the raster graphic and its pixel dimensions:

Define regions using Annotation:

Get the defined regions:

Display the regions using rectangles:

Set background color:

Set image resolution:

Set raster size in pixels:

RasterSize overrides ImageResolution:

Options  (14)

Background  (2)

Set background color:

By default, the background is opaque white:

Make the background transparent by setting Background->None:

ImageFormattingWidth  (2)

Line wrap at different widths:

Do not line wrap:

ImageResolution  (3)

The default resolution is determined by the current display settings:

Use ImageResolution to specify the desired resolution:

Use a low resolution:

Image resolution affects the raster size but not the display size of the expression:

Raster size at different resolutions:

Display size at different resolutions:

RasterSize overrides ImageResolution:

Low-resolution rasterization with the automatic raster size:

ImageSize  (2)

By default, rasterized expressions are returned at their original display size:

Use the ImageSize option to set a specific display size:

The ImageSize option overrides any previous settings in the expression being rasterized:

If an expression does not have a scalable display size, ImageSize is only setting the final display size:

LightDark  (2)

Rasterize some text assuming light mode:

Rasterize assuming dark mode:

LightDarkSwitched respects the setting of the LightDark option:

RasterSize  (3)

The default raster size is determined by the display size of the expression and the resolution settings:

Use RasterSizew to specify an explicit image width:

Use RasterSize{w,h} to specify both width and height:

Set different raster sizes in pixels:

RasterSize overrides ImageResolution. Use the default RasterSize:

Check the size of the raster:

Specify the RasterSize:

Applications  (3)

Image of the first 1000 letters from the US Constitution:

Thumbnail of a Wolfram System notebook:

Rasterize a line segment with grid lines:

With antialiasing:

Without antialiasing:

Properties & Relations  (2)

Rasterizing a graphic with a custom ImageSize option works by changing the graphic's ImageSize, not by magnifying the graphic:

A graphic embedded in a non-graphical construct will magnify instead:

Rasterizing a Cell expression displays the cell's contents as the Wolfram System front end would:

Properties of the cell that affect the contents will be displayed:

Properties that only affect margins or cell-level decorations will not be displayed:

Possible Issues  (1)

Because ImageSize is in points, it may not correspond to the pixel dimensions of the resulting image:

To specify the pixel dimensions, use RasterSize:

Interactive Examples  (1)

Interactively change the rasterization parameters:

Neat Examples  (1)

Pages from the US Constitution:

See Also

Image  Export  ExportString  Graphics  Magnify  Rotate  Antialiasing  CurrentNotebookImage  CurrentScreenImage  WebImage

Related Guides

    ▪
  • Graphics Transformations
  • ▪
  • Image Computation: Update History
  • ▪
  • Image Processing & Analysis
  • ▪
  • Creating & Importing Images
  • ▪
  • Tuning & Debugging

Related Workflows

    Related Workflows
    ▪
  • Combine Multiple Images

Related Links

  • An Elementary Introduction to the Wolfram Language : Strings and Text
  • An Elementary Introduction to the Wolfram Language : Arrays, or Lists of Lists
  • An Elementary Introduction to the Wolfram Language : Machine Learning

History

Introduced in 2007 (6.0) | Updated in 2008 (7.0) ▪ 2014 (10.0) ▪ 2017 (11.2) ▪ 2020 (12.1) ▪ 2025 (14.3)

Wolfram Research (2007), Rasterize, Wolfram Language function, https://reference.wolfram.com/language/ref/Rasterize.html (updated 2025).

Text

Wolfram Research (2007), Rasterize, Wolfram Language function, https://reference.wolfram.com/language/ref/Rasterize.html (updated 2025).

CMS

Wolfram Language. 2007. "Rasterize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/Rasterize.html.

APA

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

BibTeX

@misc{reference.wolfram_2025_rasterize, author="Wolfram Research", title="{Rasterize}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Rasterize.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_rasterize, organization={Wolfram Research}, title={Rasterize}, year={2025}, url={https://reference.wolfram.com/language/ref/Rasterize.html}, note=[Accessed: 01-December-2025]}

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
  • System Modeler

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

  • Wolfram Player
  • Wolfram Engine

  • 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
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English