Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

FileSystem

Guides

  • File System Operations

Symbols

  • BrowserOpen
  • DirectorySize
  • ImageRead
PeterBurbery`FileSystem`
ImageRead
​
ImageRead
[type,file]
reads
file
as a
type
image and returns the image.
​
Details and Options

Examples  
(2)
In[1]:=
Needs["PeterBurbery`FileSystem`"]
Import an image:
In[2]:=
ImageRead
["PNG",FindFile["ExampleData/spikey2.png"]]
Out[2]=
​
Export a random image as a PNG file:
In[1]:=
file=Export["test.png",RandomImage[1,{1000,1000}]]
Out[1]=
test.png
Import the file with
ImageRead
one hundred times, noting the elapsed time:
In[2]:=
timingA=Do
ImageRead
["PNG",file],100//AbsoluteTiming//First
Out[2]=
0.0630995
Repeat the same experiment with
Import
:
In[3]:=
timingB=Do[Import[file],100]//AbsoluteTiming//First
Out[3]=
19.1837
Note how
ImageRead
is significantly faster than
Import
:
In[4]:=
timingB/timingA
Out[4]=
304.022
However,
ImageRead
only imports a file as an
Image
.
Import
provides many more options:
In[5]:=
Import[file,"Elements"]
Out[5]=
{AnimatedImage,Animation,AnimationRepetitions,BitDepth,BlendOperation,CameraTopOrientation,Channels,ColorMap,ColorProfileData,ColorSpace,Comments,Data,DateTime,DisplayDurations,DisposalOperation,Exif,FlashUsed,GeoPosition,GPSDateTime,Graphics,GraphicsList,Image,ImageCount,ImageList,ImageSize,IPTC,MakerNote,MetaInformation,RawData,RawExif,RawIPTC,RawXMP,RedEyeCorrection,Summary,SummarySlideView,Thumbnail,ThumbnailList,XMP}
Scope  
(2)

""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com