Skip to content

Some missing mime types #3531

Description

for bmp:
image/x-bmp
image/x-ms-bmp

for ico:
image/icon
image/x-ico
image/ico
text/ico
application/ico
image/x-win-bitmap
image/vnd.microsoft.icon

for pcx:
image/vnd.zbrush.pcx

for ppm:
image/x‑portable‑bitmap
image/x‑portable‑graymap
image/x-portable-pixmap
image/x-portable-anymap

for tga:
image/x-targa

reference:
https://en.wikipedia.org/wiki/BMP_file_format
https://en.wikipedia.org/wiki/ICO_(file_format)
https://en.wikipedia.org/wiki/Pcx
https://en.wikipedia.org/wiki/Netpbm_format
https://en.wikipedia.org/wiki/.tga

there's also "image/x-ms-bmp"
they are results for it in search engines

Activity

  1. changed the title [-]some missing mime types[/-] [+]Some missing mime types[/+] on Jan 3, 2019
  2. radarhere commented on Mar 4, 2019

    @radarhere
    Member

    BMP already has a mime type.
    ICO, PCX and TGA are given one each in #3520
    I've created PR #3688 for the PPM mime types.

    The remainder of this issue is about adding mimetypes that are synonymous to the existing ones - for example, I don't think there is any difference between 'image/bmp' and 'image/x-bmp'. Multiple synonymous mimetypes is not something that can be done with the existing API of Pillow. Image.MIME is a dictionary, and returns one mimetype for each format. ImageFile.get_format_mimetype() also only returns one mimetype for an image. What I'm saying that I don't think we need to add these additional mimetypes out of any sense of completeness, because we would have to add a new method to list the possible mime types of an image, or a format, or both. Are you requesting a new method like that?

  3. radarhere commented on Mar 15, 2019

    @radarhere
    Member

    Both of those PRs have now been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions