Skip to content

Enhancement: Optional input file type extension to hint at best loader for Buffer/Stream #4562

Description

@inukshuk

Question about an existing feature

Is it possible to pass a hint to libvips to know which loader to use?

What are you trying to achieve?

Using libvips (with libraw enabled) via Sharp to open RAW files. This works fine for most files I tested, but it fails for NEF files, which have a TIFF header. When opening a NEF file in Sharp I get a very small TIFF image (thumbnail?), not the full image.

When you searched for similar issues, what did you find that might be related?

I suspect this could be because of the TIFF header of NEF files. I think libvips tries to detect NEF files based on the filename, if sharp hands off a buffer or the already opened file maybe that's the reason why the file is then loaded as TIFF.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions