You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, the image format was determined by
checking the file extension.
The format of a file is determined by its internal
bit layout rather than its extension.
File extensions are merely human-readable metadata
and do not reflect the actual contents of a file.
For instance, renaming a .jpg file to another
extension does not alter its internal format
and could result in a file of a completely d
ifferent type, such as a harmful executable.
Relying solely on file extensions to determine
file format is unreliable,
as it may lead to incorrect results. Instead,
file headers contain unique,
format-specific signatures that provide a more
accurate and stable method for
identifying a file's true nature.
Therefore, I updates the implementation to
determine the image format by checking
the file header and remove previous checking
for file extension.
0 commit comments