Repository navigation
Conversation
- alphaQuality - lossless - nearLossless
|
Hi Stephen, thank you for this PR. The new WebP options will be in the forthcoming libvips v8.4.0, hence the errors. I expect the future sharp v0.17.0 to have a dependency on libvips v8.4.x. In terms of the API, rather than the existing method-per-option approach, I'd like to start moving any format-specific options into a method specific to that format (e.g. I realise this is a much wider change than just the new WebP options here, but this PR feels like a good place to start. Let me have a go at moving the JPEG-specific /cc @dhotson who may be interested in these options also - see #408 |
|
@lovell @smremde Ah this is brilliant! It's great to see support for these options. 😄 I've been keeping a branch with just basic lossless support: master...dhotson:webp-save-lossless .. the project I was working on got delayed so I never got around to finishing it off with proper tests and docs etc sorry. Thank you very much @smremde for taking the initiative on this PR. 😄 For what it's worth—I think I agree that it makes sense to have format specific options as params, rather than separate methods. 👍 |
|
I am confused about alpha_q and near_lossless. The libvips documentation suggests this is in 8.3 as per the link I sent. Checking git, it appears that the documentation is wrong on this one. Yes I agree, per format options would be much better. I'll watch this PR and can update it once you have explored the best way of doing this. |
|
@jcupitt Could the libvips 8.3 published docs have been generated from 8.4 source? |
|
Oh dear, I'm very sorry, these are 8.4 options. The 8.3 docs had a number of serious issues (whole sections missing, broken cross-referencing, argh) and I spent ages fixing up doc generation for 8.4. The poor 8.3 docs were causing people quite a few problems, so I put the much better 8.4 docs up instead. I hoped that the win from having working docs outweighed the confusion of having a few features which didn't actually exist. 8.4 should be out within the next week, so this problem will vanish. I hope I didn't waste too much of your time. |
|
@jcupitt Not at all. This PR should work with little or no modification once sharp upgrades to 8.4 I assume. |
See commit 1159c99 for the first part of the groundwork for this. |
This approach, with complete JSDoc comments, is now available in the Functions relevant to this PR are |
|
Is this feature merged through some other PR? If not, then can I take this up to fit into the new API? |
|
@RNanwani This is not merged yet so an alternative PR would be welcome, thank you. |
|
Can you confirm if this is the right command to test vips near lossless flag |
|
@RNanwani Yes, |
|
Superseded by #685. Thank you for the original inspiration and work on this everyone. |
Please see this pull request for three additional WebP output option: lossless, alpha_q and near_lossless. See http://www.vips.ecs.soton.ac.uk/supported/8.3/doc/html/libvips/VipsForeignSave.html#vips-webpsave-buffer
I am having trouble getting near_lossless and alpha_q working
The version of libvips downloaded is 8.3.3 so I'm not sure why these are not working - any advice?
I have added documentation and a simple unit test for alpha_q, which should pass when this property can be set. I'll add unit tests for the other parameters after.