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
JPEG (.jpg, .jpeg)
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • HEIF
    • JPEG2000
    • PNG
    • TIFF
    • Raw
    • WebP
    • ICC
  • Related Guides
    • Creating Web Pages
    • Graphics Importing & Exporting
    • Image Processing
    • Importing & Exporting
    • Listing of All Formats
    • Raster Image Formats
    • Web Formats
    • Web Operations
  • Tech Notes
    • Importing Graphics and Sounds
    • Exporting Graphics and Sounds
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • HEIF
      • JPEG2000
      • PNG
      • TIFF
      • Raw
      • WebP
      • ICC
    • Related Guides
      • Creating Web Pages
      • Graphics Importing & Exporting
      • Image Processing
      • Importing & Exporting
      • Listing of All Formats
      • Raster Image Formats
      • Web Formats
      • Web Operations
    • Tech Notes
      • Importing Graphics and Sounds
      • Exporting Graphics and Sounds
IMPORT/EXPORT FORMAT
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • HEIF
    • JPEG2000
    • PNG
    • TIFF
    • Raw
    • WebP
    • ICC
  • Related Guides
    • Creating Web Pages
    • Graphics Importing & Exporting
    • Image Processing
    • Importing & Exporting
    • Listing of All Formats
    • Raster Image Formats
    • Web Formats
    • Web Operations
  • Tech Notes
    • Importing Graphics and Sounds
    • Exporting Graphics and Sounds
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • HEIF
      • JPEG2000
      • PNG
      • TIFF
      • Raw
      • WebP
      • ICC
    • Related Guides
      • Creating Web Pages
      • Graphics Importing & Exporting
      • Image Processing
      • Importing & Exporting
      • Listing of All Formats
      • Raster Image Formats
      • Web Formats
      • Web Operations
    • Tech Notes
      • Importing Graphics and Sounds
      • Exporting Graphics and Sounds

JPEG (.jpg, .jpeg)

  • Import and Export fully support the JPEG standard.
  • Import and Export support Exif 2.3, IPTC 4.2, and XMP metadata standards.

Background & Context

    • MIME type: image/jpeg
    • JPEG raster image and compression format.
    • Commonly used for photographic images by digital cameras and on the web.
    • JPEG is an acronym for Joint Photographic Experts Group.
    • Supports Grayscale, RGB, and CMYK color spaces.
    • Stores images as bitmaps at a resolution of 8 bits per color channel.
    • Binary format.
    • Uses a lossy compression method based on an 8×8 block-sized discrete cosine transform.
    • Supports different compression levels.

Import & Export

  • Import["file.jpg"] imports a JPEG file, returning an image.
  • Import["file.jpg",elem] imports the specified element from a JPEG file.
  • The import format can be specified with Import["file","JPEG"] or Import["file",{"JPEG",elem,…}].
  • Export["file.jpg",expr] exports an image, graphics, or any other expression as an image to a JPEG file.
  • Image objects are by default exported at their full raster size. Graphics and other arbitrary expressions are exported using the same raster size as their displayed form.
  • See the following reference pages for full general information:
  • Import, Exportimport from or export to a file
    CloudImport, CloudExportimport from or export to a cloud object
    ImportString, ExportStringimport from or export to a string
    ImportByteArray, ExportByteArrayimport from or export to a byte array

Notebook Interface

  • In the notebook front end, Insert ▶ Picture and the Open menu allow the import of a JPEG file into a cell.
  • Save Selection As exports the selected part of a notebook as a JPEG file.

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Data representation elements:
  • "ColorMap"color reduction palette
    "Data"array of pixel values
    "Graphics"raster image, given as a Graphics object
    "Image"raster image, given as an Image object
    "RawData"array of color map indices
    "Thumbnail"thumbnail of the first image
  • Import and Export by default use the "Image" element for the JPEG format.
  • Subelements for partial data import for any element elem can take row and column specifications in the form {elem,rows,cols}, where rows and cols can be any of the following:
  • nnth row or column
    -ncounts from the end
    n;;mfrom n through m
    n;;m;;sfrom n through m with steps of s
    {n1,n2,…}specific rows or columns ni
  • Advanced Import elements:
  • "BitDepth"bits used to represent each color channel in the file
    "CameraTopOrientation"orientation of the camera when the picture was taken
    "Channels"
  • the number of color channels used in the file
  • "ColorProfileData"embedded color profile, given as a ColorProfileData object
    "ColorSpace"color encoding used in the file
    "FlashUsed"
  • whether the flash was fired
  • "GeoPosition"latitude and longitude represented as a GeoPosition object
    "GPSDateTime"
  • image creation date and time registered by GPS
  • "RasterSize"raster dimensions
    "RedEyeCorrection"whether a red-eye correction was performed
  • Metadata elements:
  • "Exif"formatted Exif (Exchange image file format)
    "IPTC"formatted IPTC (International Press Telecommunications Council)
    "XMP"formatted XMP (Extensible metadata platform)
    "MetaInformation"combination of all formatted metadata present in the file
  • Raw metadata, as stored in the file, can be imported using "RawExif", "RawXMP" and "RawIPTC" elements which are returned in an association.
  • All Exif and IPTC tags can be imported individually. Common tags include:
  • "ApertureValue"lens aperture
    "Artist"photographer or image creator
    "DateTime"image creation date and time
    "ExposureTime"exposure time, given in seconds
    "FlashInfo"
  • flash information: flash fired, red-eye correction, etc.
  • "FNumber"F number
    "FocalLength"actual focal length of the lens, given in millimeters
    "GPSAltitude"altitude of the GPS position
    "GPSLatitude"latitude of the GPS position
    "GPSLongitude"longitude of the GPS position
    "Make"manufacturer of the recording equipment
    "Model"model name or model number of the equipment
    "Software"name and version of the software or firmware of the camera or image input device used to generate the image

Import Options

  • Import options include:
  • ImageResolutionAutomaticresolution values for import and export
    "ImageTopOrientation"Automaticorientation of the image as stored in the file
    IncludeMetaInformationAllmetadata types to import and export
    RasterSizeAutomaticdimensions of the image
  • Possible settings for "ImageTopOrientation" are Automatic, Top, Bottom, Left or Right.

Export Options

  • Export options include:
  • ColorSpace"RGB"color space to be used in the file
    CompressionLevel0.25sets the JPEG compression parameter
    ImageFormattingWidth$ImageFormattingWidthtarget width when formatting an object
    ImageResolutionAutomaticresolution values for import and export
    "ImageTopOrientation"Automaticorientation of the image as stored in the file
    IncludeMetaInformationAllmetadata types to import and export
    "Progressive"Falsewhether to store the image in a way that allows progressive display while the file is being loaded
    RasterSizeAutomaticdimensions of the image
    "Smoothing"0the JPEG smoothing parameters, given as a number in the range 0 (no smoothing) to 1
  • Supported ColorSpace settings are: "Grayscale", "RGB", and "CMYK". Using ColorSpace->Automatic, Export attempts to create a JPEG file with the same color space.
  • The value of CompressionLevel can be in the range from 0 to 1, with larger values resulting in smaller file sizes but lower-quality encodings.

Examples

open all close all

Basic Examples  (3)

Import a JPEG image as an image:

Summary of an image:

Export an RGB image to JPEG:

Scope  (3)

Import the image as a graphics:

Import Exif metadata:

Import a metadata element:

Import multiple metadata elements:

Import Elements  (35)

Available Elements  (4)

List of available elements:

List of available Exif elements:

List of available IPTC elements:

Get image-related information as list of rules:

Data Representation  (8)

"ColorMap"  (2)

Get the color-reduction palette created on import:

Visualize the color-reduction palette:

Apply the color map to the raw data to create the stored image:

"Data"  (1)

Import the image data:

Create an image from imported data:

"Graphics"  (1)

Import as a Graphics object:

"Image"  (2)

Import as an Image object:

This is the default import element for JPEG:

Import only the specified rows:

Import specified rows and columns:

"RawData"  (1)

Get the raw data:

Plot the array of raw data:

Use the color map to create the stored image:

"Thumbnail"  (1)

Import a thumbnail of an image:

Metadata  (23)

"BitDepth"  (1)

Get the bit count for the representation of each color channel:

"CameraTopOrientation"  (2)

Get the camera orientation at the capture time:

The image is auto-rotated on Import:

An auto-rotated image has an updated Exif tag:

Avoid auto-rotation by setting the "ImageTopOrientation" option:

"Channels"  (1)

Get the number of image channels:

"ColorProfileData"  (1)

Get the embedded color profile, given as a ColorProfileData object:

The color profile is stored in the ColorSpace option of the imported image:

"ColorSpace"  (1)

Get the color encoding used on export:

Use ImageColorSpace to get the color space of an imported image:

"DateTime"  (1)

Get the date and time that the image was captured:

"Exif"  (3)

Get Exif metadata:

Extract an individual tag from the association:

Individual Exif tags can also be imported directly:

Some Exif tags are processed to give more detailed information:

Compare with the raw "FlashInfo" tag:

"FlashUsed"  (1)

Import a tag that shows whether the flash fired:

"FlashUsed" is a subelement of the "FlashInfo" element:

Extract "FlashUsed" from the full "Exif":

"GeoPosition"  (2)

Import an image geo position:

Use the image thumbnail as the marker:

The image geo position may be unavailable:

"GPSDateTime"  (1)

Get the image creation date and time registered by GPS:

"IPTC"  (1)

Get IPTC metadata:

"MetaInformation"  (1)

Get all the metadata:

"RasterSize"  (1)

Get the dimensions of the image stored in the file:

Using ImageDimensions on an imported image gives the same result:

"RawExif"  (1)

Import raw Exif data:

When importing processed Exif data, missing tags are removed:

Raw Exif tags return the actual values stored in the file:

When importing "Exif", most tags are processed:

"RawIPTC"  (1)

Import unprocessed IPTC metadata:

"RawXMP"  (1)

Import unprocessed XMP metadata:

"RedEyeCorrection"  (1)

Whether a red-eye correction was performed:

"Summary"  (1)

Get the image summary:

"XMP"  (1)

Get XMP metadata:

Extract the XMP "BasicSchema" metadata:

Import Options  (6)

ImageResolution  (1)

By default, the image resolution is extracted from the file:

Specify the resolution of the imported image:

Specify different resolutions in and directions:

"ImageTopOrientation"  (1)

By default, images are imported with the native orientation stored in the file:

Specify the side that is supposed to be on the top:

The correct orientation can also be achieved by rotating the image to be upright:

IncludeMetaInformation  (3)

By default, all available metadata is imported:

Possible classes of metadata for JPEG files are "Exif", "IPTC", and "XMP":

Import the image with no metadata:

Import the image with "XMP" metadata only:

RasterSize  (1)

By default, images are imported in their full resolution:

Specify the raster size of the imported JPEG image:

Export Options  (7)

ColorSpace  (1)

By default, the native color space of the image is used for export:

Export as a CMYK image:

CompressionLevel  (2)

By default, an automatic compression is used:

Use maximum compression:

Use minimum compression:

Compare the byte count for different compression levels:

ImageResolution  (1)

By default, the original image resolution is used during export:

Specify the resolution of the exported image:

"ImageTopOrientation"  (1)

By default, the upright image is exported using "ImageTopOrientation"->Top:

Specify the orientation:

Import using the original orientation:

IncludeMetaInformation  (1)

By default, all existing meta-information is exported:

Specify the metadata to include:

Export no metadata:

RasterSize  (1)

By default, the image is exported in the full resolution:

Specify the raster size of the exported image:

See Also

Import  Export  CloudExport  CloudImport

Formats: HEIF  JPEG2000  PNG  TIFF  Raw  WebP  ICC

Tech Notes

    ▪
  • Importing Graphics and Sounds
  • ▪
  • Exporting Graphics and Sounds

Related Guides

    ▪
  • Creating Web Pages
  • ▪
  • Graphics Importing & Exporting
  • ▪
  • Image Processing
  • ▪
  • Importing & Exporting
  • ▪
  • Listing of All Formats
  • ▪
  • Raster Image Formats
  • ▪
  • Web Formats
  • ▪
  • Web Operations

History

Introduced in 1999 (4.0) | Updated in 2016 (11.0) ▪ 2020 (12.2) ▪ 2022 (13.1) ▪ 2022 (13.2)

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