Giter Site home page Giter Site logo

tiffloader's People

Contributors

malcolmmclean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tiffloader's Issues

Crash with certain LZW files

I tested your library because in my own TIFF decoder I have a problem with ImageMagick's LZW files and I wanted to see how yours handles the problem, and it crashed in the function bitstreamtorgba() while attempting to write to rgba[0].

Here's the file I used: https://www.mediafire.com/view/b39ooh9qemnqafl/imagemagick_lzw_8.tif/file

The file was created with the command convert.exe %1 -set colorspace RGB -resize 2000x -colorspace sRGB -depth 8 -compress lzw "imagemagick lzw 8.tif" (I used a 32-bit linear image as input, hence the colourspace stuff, other than that it's just really the standard way to create a LZW-compressed TIFF with ImageMagick). The problem with such files is that the bit stream can sometimes contain codes that aren't yet in the dictionary, for instance the first such problematic code is a 12-bit code at bit 18751 from the beginning of the LZW strip #381 (also the one where your code crashes), the code is 3073 when the highest entry in my dictionary (and presumably yours as well) is code 2051, which shouldn't be possible. In another file I've even seen a code 364 right after the 256 clear code! (see https://stackoverflow.com/questions/55674925/decoding-tiff-lzw-codes-not-yet-in-the-dictionary)

So it appears that we both have the same problem, and apparently that would be only with files created by ImageMagick (which is kind of a big deal so I feel like I can't just ignore the problem), but the real mystery is that everybody else seems to handle the problem well, MS Paint loads the file perfectly fine for instance. How, I have no idea.

Licensing

I read in the source code that tiffloader is free for public use. Is it possible to get clarification on this? Any possibility of the code being available in an BSD or MIT license?

How to use it in Matlab?

Hello,

I'm really interested in using your code to load Tiff files.
As I found your link in a Matlab Forum, I expected to use it in Matlab.
Is it possible? And how?
Thanks for your answer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.