answersLogoWhite

0

What is the datatype of images?

Updated: 10/26/2022
User Avatar

Wiki User

7y ago

Best Answer

There is no single data type for images as there are many different ways to represent an image in computer memory. At best we can describe all image types as being a binary data type. In order to determine the actual type we must read the first few bytes of data looking for a known signature. Once we know the image type we can read the complete image header correctly and thus obtain the specific information we need to decode the payload properly.

Note that we cannot rely on the file extension to determine the data type. Changing a BMP extension to a JPG extension does not change the file's encoding, it merely changes its name (the extension is considered part of the fully-qualified file name). A file's extension simply provides a convenient method for the operating system to associate file types with the applications that use them without having to examine the file itself.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the datatype of images?
Write your answer...
Submit
Still have questions?
magnify glass
imp