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

Add ability to read and write native vips .v files #500

Merged
merged 5 commits into from Jul 9, 2016
Merged

Add ability to read and write native vips .v files #500

merged 5 commits into from Jul 9, 2016

Conversation

mhirsch
Copy link
Contributor

@mhirsch mhirsch commented Jul 7, 2016

This pr adds the native vips .v file type to the formats that are file read/write-able in sharp. Vips doesn't seem to support reading/writing vips format to/from buffers, so that capability is not included in this pr.

@lovell
Copy link
Owner

lovell commented Jul 7, 2016

Please can you add a test case for saving a vips-format file, otherwise (after a rebase) this looks great, thank you very much.

@mhirsch
Copy link
Contributor Author

mhirsch commented Jul 7, 2016

Wow, look at that. Unit tests work! Added the test you asked for and caught a bug with it ;)

@lovell
Copy link
Owner

lovell commented Jul 8, 2016

Thanks for the updates Matt.

Given vips format is filesystem-only, we won't need any of the additions to index.js as libvips can infer what it needs from the file extension (the toFormat logic is for Buffer/Stream-based output).

@@ -139,7 +139,7 @@ NAN_METHOD(format) {
// Which load/save operations are available for each compressed format?
Local<Object> format = New<Object>();
for (std::string f : {
"jpeg", "png", "webp", "tiff", "magick", "openslide", "dz", "ppm", "fits", "gif", "svg", "pdf"
"jpeg", "png", "webp", "tiff", "magick", "openslide", "dz", "ppm", "fits", "gif", "svg", "pdf", "vips"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency this should probably be "v".

@coveralls
Copy link

coveralls commented Jul 8, 2016

Coverage Status

Coverage decreased (-0.6%) to 97.791% when pulling a5ed39c on mhirsch:v_file_io into 65b7f7d on lovell:master.

@lovell lovell merged commit f672f86 into lovell:master Jul 9, 2016
@lovell
Copy link
Owner

lovell commented Jul 9, 2016

Thank you!

@mhirsch mhirsch deleted the v_file_io branch July 9, 2016 17:52
@lovell lovell added this to the v0.15.1 milestone Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants