Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIFF format to/from Buffer, requires libvips v8.5.2+ #587

Closed
strarsis opened this issue Oct 2, 2016 · 12 comments
Closed

TIFF format to/from Buffer, requires libvips v8.5.2+ #587

strarsis opened this issue Oct 2, 2016 · 12 comments
Milestone

Comments

@strarsis
Copy link

strarsis commented Oct 2, 2016

I cannot find a tif(f)() output method, also toFormat('tiff')/toFormat('tif') results in error:

[Error: Unsupported output format tif(f)]

It would be great if sharp supports tiff as output format, too.

@lovell
Copy link
Owner

lovell commented Oct 3, 2016

Hello, TIFF output is limited to filesystem only - use something like toFile('file.tif', ...) to access this feature.

@lovell lovell added the question label Oct 3, 2016
@strarsis
Copy link
Author

strarsis commented Oct 3, 2016

I have to use the extra steps reading/writing the file (using fs module)
because of the issue with special characters in path.

It would be great if output methods for TIFF is expanded to buffer, too.

@lovell
Copy link
Owner

lovell commented Oct 3, 2016

"the issue with special characters in path"

This has been fixed in libvips 8.4.x - see https://github.com/jcupitt/libvips/issues/294

@strarsis
Copy link
Author

strarsis commented Oct 3, 2016

Do I have to install/build the newer libvips myself or is it shipped/built by sharp package?
I still have this issue on Windows + Linux - see this test: https://github.com/strarsis/sharp-issue-characters/

Edit: Apparently, an older libvips version is used: https://github.com/lovell/sharp/blob/master/package.json#L84

Besides, it would be still helpful if TIFF could be obtained as buffer for
further processing in-memory without the need of a temporary files.

@lovell
Copy link
Owner

lovell commented Oct 3, 2016

The next major version of sharp, v0.17.0, will be bundled with a pre-compiled libvips v8.4.x+.

"it would be still helpful if TIFF could be obtained as buffer"

You'll need to add tiffload_buffer (and tiffsave_buffer) support to libvips, then expose the feature in sharp. If you're willing to work on this and submit a PR then I'm sure John will help.

@lovell lovell changed the title TIFF format TIFF format to/from Buffer Oct 3, 2016
@lovell
Copy link
Owner

lovell commented Oct 3, 2016

@strarsis
Copy link
Author

strarsis commented Oct 3, 2016

Thanks!

@strarsis strarsis closed this as completed Oct 3, 2016
@strarsis strarsis reopened this Oct 3, 2016
@lovell
Copy link
Owner

lovell commented Oct 3, 2016

I'll assume you intended to close this, feel free to re-open if not.

@lovell lovell closed this as completed Oct 3, 2016
@felixbuenemann
Copy link
Contributor

@lovell John implemented tiffsave_buffer in master and it should be included in vips 8.5.

@lovell
Copy link
Owner

lovell commented Oct 15, 2016

@felixbuenemann Thanks, will re-open and mark as a future enhancement.

@lovell lovell reopened this Oct 15, 2016
@lovell lovell changed the title TIFF format to/from Buffer TIFF format to/from Buffer, requires future libvips Oct 15, 2016
@lovell lovell added this to the v0.18.0 milestone Jan 7, 2017
@lovell lovell changed the title TIFF format to/from Buffer, requires future libvips TIFF format to/from Buffer, requires libvips v8.5.0 Jan 7, 2017
@lovell lovell changed the title TIFF format to/from Buffer, requires libvips v8.5.0 TIFF format to/from Buffer, requires libvips v8.5.2+ Apr 4, 2017
@lovell
Copy link
Owner

lovell commented May 4, 2017

Commit c8e59f0 on the ridge branch adds Buffer and Stream based TIFF output. This will be in v0.18.0.

@lovell
Copy link
Owner

lovell commented May 30, 2017

v0.18.0 now available with this feature.

@lovell lovell closed this as completed May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants