dlib-webp 0.1.0
saveWEBP / saveLosslessWEBP / saveWEBPToArray / saveLosslessWEBPToArray / loadWEBP
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Testing
dub test --debug=featureTest
Usage
import dlib.image;
import dlibwebp;
void main() {
auto img = loadPNG("input.png");
// Medium quality.
img.saveWEBP("quality.webp");
img.saveWEBP("q50.webp", 50);
img.saveWEBP("hq.webp", WEBPQuality.HIGH);
// But it is still YUV 4:2:0.
img.saveWEBP("q100.webp", WEBPQuality.HIGHEST);
// And it is not.
img.saveWEBP("lossless.webp", WEBPQuality.LOSSLESS);
// You may want to use the streaming API
// just like savePNG, saveTGA, etc.
// auto res = img.saveWEBP(outputStream, 50);
// Also, you can save to arrays:
// ubyte[] lossy = img.saveWEBPToArray();
// ubyte[] lossy50 = img.saveWEBPToArray(50);
// ubyte[] lossless = img.saveWEBPToArray(WEBPQuality.LOSSLESS);
// And back.
auto readBack = loadWEBP("lossless.webp");
readBack.savePNG("lossless.png");
// Also available:
// loadWEBP(inputStream)
// loadWEBP(ubyte[])
}
License
Boost Software License, Version 1.0 http://www.boost.org/LICENSE10.txt
Dependencies:
- [libwebp](https://code.dlang.org/packages/libwebp) BSD 3-clause
- [dlib](https://github.com/gecko0307/dlib/) Boost Software License, Version 1.0
- [feature-test-d](https://github.com/dmonagle/feature-test-d) (for testing) MIT
- Registered by George U.
- 0.1.0 released 4 years ago
- georgy7/dlib-webp
- BSL-1.0
- Authors:
- Dependencies:
- feature-test-d, exceptions, dlib, libwebp
- Versions:
-
0.1.0 2020-May-29 0.0.7 2020-May-22 0.0.6 2017-Feb-08 0.0.5 2017-Feb-08 0.0.4 2017-Feb-03 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
38 downloads total
-
- Score:
- 0.0
- Short URL:
- dlib-webp.dub.pm