ImageFileScan
✖
ImageFileScan
✖
ImageFileScan[f,inputfile]
applies the function f to the list of channel values for each pixel of the image stored in inputfile.
Details and Options


- ImageFileScan can be used to read and process successive pixel data from a very large image file whose size could exceed available memory.
- The channel values supplied to f are normally in the range 0 to 1, regardless of the underlying type used in the Image object.
- ImageFileScan[f,…] discards the results of applying f to the pixels. Unlike ImageFileApply, ImageFileScan does not create a new file and returns Null.
- ImageFileScan is useful in carrying out an operation on individual pixels where the operation has a "side effect", such as making an assignment.
- ImageFileScan works with TIFF, JPEG, and PNG files.
- ImageFileScan works on images with any number of channels.
- The image file inputfile can be given as a string or a File object.
- ImageFileScan traverses the image in a row-wise order from left to right.
- You can use Throw to exit from ImageFileScan. »
- The following options can be given:
-
Interleaving True whether to supply f lists of channel values Method Automatic method to use - The following suboptions can be given to Method:
-
"ImageList" All frames to process from a file with multiple images "MaxBlockSize" 8000000 maximal size of image blocks in pixels loaded into the memory - The value of the option "MaxBlockSize" may be exceeded if it is smaller than the smallest block supported for the input file.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Compute the total intensity of an out-of-core image:
In[1]:=1

✖
https://wolfram.com/xid/01y265m99mc-yzzwtt
In[3]:=3

✖
https://wolfram.com/xid/01y265m99mc-sw0vga
Out[3]=3

In[1]:=1

✖
https://wolfram.com/xid/01y265m99mc-zgf4d3
In[2]:=2

✖
https://wolfram.com/xid/01y265m99mc-1kpx6w
Out[2]=2

Compare with in-memory level computation:
In[3]:=3

✖
https://wolfram.com/xid/01y265m99mc-2mvam3
Out[3]=3

Compute the minimum and maximum values for each channel:
In[1]:=1

✖
https://wolfram.com/xid/01y265m99mc-53mt85
Out[1]=1

Generalizations & Extensions (1)Generalized and extended use cases
Wolfram Research (2012), ImageFileScan, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageFileScan.html (updated 2016).
✖
Wolfram Research (2012), ImageFileScan, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageFileScan.html (updated 2016).
Text
Wolfram Research (2012), ImageFileScan, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageFileScan.html (updated 2016).
✖
Wolfram Research (2012), ImageFileScan, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageFileScan.html (updated 2016).
CMS
Wolfram Language. 2012. "ImageFileScan." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ImageFileScan.html.
✖
Wolfram Language. 2012. "ImageFileScan." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ImageFileScan.html.
APA
Wolfram Language. (2012). ImageFileScan. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageFileScan.html
✖
Wolfram Language. (2012). ImageFileScan. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageFileScan.html
BibTeX
✖
@misc{reference.wolfram_2025_imagefilescan, author="Wolfram Research", title="{ImageFileScan}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/ImageFileScan.html}", note=[Accessed: 08-May-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_imagefilescan, organization={Wolfram Research}, title={ImageFileScan}, year={2016}, url={https://reference.wolfram.com/language/ref/ImageFileScan.html}, note=[Accessed: 08-May-2025
]}