Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
ImageTools[Read] - read an image from a file
Calling Sequence
Read( file, img, opts )
Parameters
file
-
string; the pathname of the image file to read
img
(optional) Image; rtable to read image into
opts
(optional) equation(s) of the form option = value; specify options for the Read command
Description
The Read command returns an Image read from an image file in one of the supported formats. After completing the read, the file is closed.
The Read command can read most variations of the supported formats. Those that are not grayscale, RGB, or RGBA, such as YCbCr or color-mapped images, are converted to one of the supported formats while being read.
The file parameter is the name of the file and it must be a Maple string. If the format option is not provided, the file format is determined from the extension of the file name. For example, the string image.jpg is read as a JPEG file.
The optional img parameter is a data structure into which the image is written. It must be of type Image and have the proper dimensions and layers for the image. Using the img parameter is equivalent to using the output option.
Options
format = BMP, JPEG, or TIFF
Specifies the image format. It must be one of the values in ImageTools[Formats]. If not specified, the Read command guesses the format from the extension of file.
output = imgo
Specifies a data structure into which the output is written; imgo must be of type Image. The size must match that of the input. If imgo is one layer, then the image is converted to a grayscale, as needed. If imgo has four layers than the fourth layer is set to all zeros. The default is NULL.
Examples
See Also
ImageTools, ImageTools[Formats], ImageTools[RGBtoGray], ImageTools[Write]
Download Help Document