@cpp.js/package-webp
v1.0.0-beta.23
Published
This package provides a WebP library compiled with Cpp.js, enabling seamless usage of WebP functionalities in JavaScript, WebAssembly and React Native projects. It supports efficient image processing for web and mobile applications.
Downloads
233
Maintainers
Readme
@cpp.js/package-webp
Precompiled webp library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.
Integration
Start by installing these package with the following command:
npm install @cpp.js/package-webp
To enable the library, modify the cppjs.config.js file as shown below.
+import webp from '@cpp.js/package-webp/cppjs.config.js';
export default {
dependencies: [
+ webp
]
paths: {
config: import.meta.url,
}
};
Usage
Below are the steps to use the webp in your C++ or JavaScript code.
Usage in C++ Code
+#include <webp/decode.h>
std::string Native::sample() {
+ return std::to_string(WebPGetDecoderVersion());
}
License
This project includes the precompiled webp library, which is distributed under the BSD 3-Clause License.
WebP Homepage: https://developers.google.com/speed/webp