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
ImageCrop
  • See Also
    • ImageTrim
    • ImagePad
    • ImageTake
    • BorderDimensions
    • ImagePartition
    • ImageSize
    • ImageAugmentationLayer
  • Related Guides
    • Basic Image Manipulation
    • Geometric Operations
    • Computational Photography
    • Video Editing
    • Video Computation: Update History
    • Image Computation: Update History
  • Workflows
    • Crop 2D Images
    • Crop 3D Images
  • Tech Notes
    • Image Processing
    • See Also
      • ImageTrim
      • ImagePad
      • ImageTake
      • BorderDimensions
      • ImagePartition
      • ImageSize
      • ImageAugmentationLayer
    • Related Guides
      • Basic Image Manipulation
      • Geometric Operations
      • Computational Photography
      • Video Editing
      • Video Computation: Update History
      • Image Computation: Update History
    • Workflows
      • Crop 2D Images
      • Crop 3D Images
    • Tech Notes
      • Image Processing

ImageCrop[image]

crops image by removing borders of uniform color.

ImageCrop[image,size]

crops image based on the size specification size.

ImageCrop[image,size,spec]

crops image by removing pixels from sides specified by spec.

ImageCrop[video,…]

crops frames of video.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Data  
Size Specification  
Side Specification  
Options  
Padding  
Applications  
Properties & Relations  
Possible Issues  
See Also
Tech Notes
Related Guides
Related Workflows
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ImageTrim
    • ImagePad
    • ImageTake
    • BorderDimensions
    • ImagePartition
    • ImageSize
    • ImageAugmentationLayer
  • Related Guides
    • Basic Image Manipulation
    • Geometric Operations
    • Computational Photography
    • Video Editing
    • Video Computation: Update History
    • Image Computation: Update History
  • Workflows
    • Crop 2D Images
    • Crop 3D Images
  • Tech Notes
    • Image Processing
    • See Also
      • ImageTrim
      • ImagePad
      • ImageTake
      • BorderDimensions
      • ImagePartition
      • ImageSize
      • ImageAugmentationLayer
    • Related Guides
      • Basic Image Manipulation
      • Geometric Operations
      • Computational Photography
      • Video Editing
      • Video Computation: Update History
      • Image Computation: Update History
    • Workflows
      • Crop 2D Images
      • Crop 3D Images
    • Tech Notes
      • Image Processing

ImageCrop

ImageCrop[image]

crops image by removing borders of uniform color.

ImageCrop[image,size]

crops image based on the size specification size.

ImageCrop[image,size,spec]

crops image by removing pixels from sides specified by spec.

ImageCrop[video,…]

crops frames of video.

Details and Options

  • Image cropping, also known as image trimming, is the process of removing border pixels from an image and can be used for removing uninteresting regions or extracting regions of interest.
  • ImageCrop[image] effectively removes borders from image whose pixel value distribution is almost uniform.
  • ImageCrop[image,{width,height}] by default removes pixels symmetrically from image, or if width or height is larger than for image, it adds pixels symmetrically.
  • The image size specification size in ImageCrop[image,size] can have the following forms:
  • widthparticular width; height based on aspect ratio
    {width,height}particular width and height
    {width,depth,height}particular width, depth and height in 3D
  • Specifications for either of the dimensions can be any of the following:
  • dd pixels
    UpTo[d]maximum d pixels
    {dmin,dmax}pixel ranges
    Automaticdetermine value from aspect ratio
    Fulldo no cropping in this dimension
  • The cropping specification spec in ImageCrop[image,size,spec] can have the following forms:
  • sidecrop on the specified side; center otherwise
    {side1,side2}crop on the specified sides
    {ax,ay}assign a fraction of cropping to each side
  • Sides can be specified as Left, Right, Bottom or Top. Center indicates symmetrical cropping.
  • Cropping fractions are between and . In the horizontal case, is equivalent to Left, to Right and to Center. In the vertical case, is equivalent to Bottom, and to Top.
  • ImageCrop[image,size] is equivalent to ImageCrop[image,size,Center].
  • To obtain an image with an aspect ratio r, use ImageCrop[image,width{1,r}].
  • If the final image specified by ImageCrop[image,…] extends beyond image, then pixels are added according to the setting for Padding.

Examples

open all close all

Basic Examples  (2)

Automatically crop uniform borders:

Crop an image to a given size:

Scope  (7)

Data  (3)

Crop a 2D image:

Crop frames of a video:

Crop constant areas of a 3D image:

Size Specification  (2)

Crop an image to a width of 100 pixels, preserving the aspect ratio:

Crop to a 100×100 pixel square:

Do not crop the height of the image:

Crop to a height of 100 pixels, preserving the aspect ratio:

Make the largest dimension not greater than 100 pixels:

Pad the image by using values greater than the image dimensions:

Crop a 3D image:

Crop a 3D image in the vertical dimension only:

Side Specification  (2)

Crop on the left side, preserving the aspect ratio:

Crop at the left side, using numerical values:

Crop evenly from both sides using numerical values:

Crop from the left and bottom sides:

Crop a 3D image:

Crop the top 23 slices off a 3D image:

Extract a selected horizontal slice of a 3D image:

Take all slices in a selected region of the 3D image:

Options  (2)

Padding  (2)

By default, black padding is used:

Pad the image with a specified color:

Specify a different padding scheme:

Use Padding->None to avoid padding:

The result may be smaller than the given size:

With Padding->Automatic, a color based on the boundary pixel values is chosen:

If the boundary pixels do not have consistent colors, black is used:

Applications  (1)

Letterbox a wide image into a 320×240 format:

Properties & Relations  (3)

ImageCrop preserves the aspect ratio of the image:

Use ImageTake to crop an image:

ImageCrop adds or removes pixels on the sides to achieve specified output dimensions:

Use ImagePad to add or remove specified numbers of pixels on the sides:

Possible Issues  (2)

Cropping happens if a similar border is present on at least two sides:

If a border is present only on one side, it is not cropped:

Detect the border using BorderDimensions and crop it using ImagePad:

See Also

ImageTrim  ImagePad  ImageTake  BorderDimensions  ImagePartition  ImageSize  ImageAugmentationLayer

Function Repository: ImageSaliencyCrop  ImageRegionCrop  ArrayCropPad

Tech Notes

    ▪
  • Image Processing

Related Guides

    ▪
  • Basic Image Manipulation
  • ▪
  • Geometric Operations
  • ▪
  • Computational Photography
  • ▪
  • Video Editing
  • ▪
  • Video Computation: Update History
  • ▪
  • Image Computation: Update History

Related Workflows

    Related Workflows
    ▪
  • Crop 2D Images
  • ▪
  • Crop 3D Images

History

Introduced in 2008 (7.0) | Updated in 2014 (10.0) ▪ 2015 (10.3) ▪ 2021 (13.0)

Wolfram Research (2008), ImageCrop, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageCrop.html (updated 2021).

Text

Wolfram Research (2008), ImageCrop, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageCrop.html (updated 2021).

CMS

Wolfram Language. 2008. "ImageCrop." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageCrop.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_imagecrop, organization={Wolfram Research}, title={ImageCrop}, year={2021}, url={https://reference.wolfram.com/language/ref/ImageCrop.html}, note=[Accessed: 01-March-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