ImportByteArray
Listing of Formats »ImportByteArray [ba,"format"]
imports data in the specified format from a ByteArray object.
ImportByteArray [ba,elements]
imports the specified elements.
ImportByteArray [ba]
attempts to determine the format automatically.
Details
- ImportByteArray handles a large number of formats, each typically with many different possible elements. The possible formats are given in the list $ImportFormats and in the "Listing of All Formats".
- ImportByteArray works just like Import , with the same element specifications and options.
Examples
open allclose allBasic Examples (1)
Export an image as a ByteArray object:
Import the bytes to produce the original image:
Import an element from the bytes:
Scope (2)
Export a typeset mathematical formula as a ByteArray object:
Import the bytes to produce a resolution-independent version of the formula:
Export a color map and corresponding raw data as a ByteArray object:
Import the bytes to produce the original animated GIF image:
Import a color map and corresponding raw data from a ByteArray :
Applications (2)
Properties & Relations (2)
ImportByteArray returns the same result as ByteArrayToString followed by ImportString :
Import can be viewed as a combination of ReadByteArray and ImportByteArray :
Possible Issues (1)
A list of bytes is returned when ImportByteArray cannot automatically determine the format:
Specify the format to get a string result:
See Also
ExportByteArray ByteArrayToString ReadByteArray ImportString ByteArrayFormat FileFormatProperties SetFileFormatProperties ByteArray Import NotebookImport
Function Repository: ReadPNG
Related Guides
History
Text
Wolfram Research (2017), ImportByteArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ImportByteArray.html.
CMS
Wolfram Language. 2017. "ImportByteArray." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImportByteArray.html.
APA
Wolfram Language. (2017). ImportByteArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImportByteArray.html
BibTeX
@misc{reference.wolfram_2025_importbytearray, author="Wolfram Research", title="{ImportByteArray}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ImportByteArray.html}", note=[Accessed: 28-April-2025 ]}
BibLaTeX
@online{reference.wolfram_2025_importbytearray, organization={Wolfram Research}, title={ImportByteArray}, year={2017}, url={https://reference.wolfram.com/language/ref/ImportByteArray.html}, note=[Accessed: 28-April-2025 ]}