Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate .bmp format #13922

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/lua_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ the clients (see [Translations]). Accepted characters for names are:

Accepted formats are:

images: .png, .jpg, .bmp, .tga
images: .png, .jpg, .tga, (deprecated:) .bmp
sounds: .ogg vorbis
models: .x, .b3d, .obj

Expand Down
7 changes: 7 additions & 0 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,13 @@ bool Server::addMediaFile(const std::string &filename,
return false;
}

const char *deprecated_ext[] = { ".bmp", nullptr };
if (!removeStringEnd(filename, deprecated_ext).empty())
sfan5 marked this conversation as resolved.
Show resolved Hide resolved
{
warningstream << "Media file \"" << filename << "\" is using a"
" deprecated format and will stop working in the future." << std::endl;
}

SHA1 sha1;
sha1.addBytes(filedata.c_str(), filedata.length());

Expand Down