neilharvey / FileSignatures

A small library for detecting the type of a file based on header signature (also known as magic number).
MIT License
250 stars 41 forks source link

Update documentation for bmp file type #56

Closed kevgeni closed 1 year ago

kevgeni commented 1 year ago

Fix media-type for bitmap image content type in the documentation code property has image/bmp, but documentation refer to image/bitmap. all public documentation refer to image/bmp.

https://github.com/neilharvey/FileSignatures/blob/master/src/FileSignatures/Formats/Bmp.cs https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types https://www.iana.org/assignments/media-types/media-types.xhtml

string[] allowedType = { "image/bitmap", "image/gif", "image/jpeg", "image/png" };
var recognised = FileFormatLocator.GetFormats().Where(w=>allowedType.Contains(w.MediaType));
//does not contains bitmap

var allformats = FileFormatLocator.GetFormats();
//allformat contains image/bmp
neilharvey commented 1 year ago

Good spot, thanks for the PR!