Jimp: Error: Unsupported MIME type: image/tiff

Created on 6 Sep 2017  路  6Comments  路  Source: oliver-moran/jimp

Looks like Jimp doesn't support TIFF images. It throws an error saying: "Unsupported MIME type: image/tiff".

Here is my test file: sample.zip

Most helpful comment

Ok, it was easy enough for me to do it in less than hour, could you merge it please ?

All 6 comments

Any updates on this ?

I would also like to have TIFF support. Would you be interested in that ?

If yes, can you help as to where to start to do that in a PR ?

It seems that you use external libraries to do the parsing for you, so I will try to do the same for TIFF with : https://github.com/seikichi/tiff.js

Ok, it was easy enough for me to do it in less than hour, could you merge it please ?

+1

Has this fix been deployed to the public npm registry? I am on v0.2.28 and still seeing "image/tiff not supported", and none of the code changes in 536310a appear in the source that gets downloaded to node_modules.

Even after downloading the current source from GitHub I am still unable to use Jimp to read TIFF images, even the sample image in test/sample/rgb.tiff. Am I doing something wrong? From the unzipped jimp-master folder:

mymachine:jimp-master me$ node
> var Jimp = require('.')
undefined
> Jimp.read('test/samples/rgb.tiff')
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events:
      { removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
> TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Receivedtype undefined
    at Function.from (buffer.js:195:11)
    at new Buffer (buffer.js:170:17)
    at Jimp.parseBitmap (/mydir/jimp-master/index.js:403:23)

Ignore this comment, I made a mistake and didn't have the correct dependencies installed before running this test. My first comment stands though: it would be nice to have this fix available in the public npm registry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DylanPiercey picture DylanPiercey  路  4Comments

PainKKKiller picture PainKKKiller  路  5Comments

SamuelZhaoY picture SamuelZhaoY  路  3Comments

chancein007 picture chancein007  路  5Comments

molipha picture molipha  路  6Comments