@cpp.js/package-tiff-multithread 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+
2
+ Copyright © 1988-1997 Sam Leffler
3
+ Copyright © 1991-1997 Silicon Graphics, Inc.
4
+
5
+ Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
8
+
9
+ IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @cpp.js/package-tiff
2
+ **Precompiled tiff library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.**
3
+
4
+ <a href="https://www.npmjs.com/package/@cpp.js/package-tiff">
5
+ <img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-tiff?style=for-the-badge" />
6
+ </a>
7
+ <a href="https://gitlab.com/libtiff/libtiff">
8
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Funpkg.com%2F%40cpp.js%2Fpackage-tiff%2Fpackage.json&query=%24.nativeVersion&style=for-the-badge&label=TIFF" />
9
+ </a>
10
+ <a href="https://libtiff.gitlab.io/libtiff/project/license.html">
11
+ <img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-tiff?style=for-the-badge" />
12
+ </a>
13
+
14
+ ## Integration
15
+ Start by installing these package with the following command:
16
+
17
+ ```sh
18
+ npm install @cpp.js/package-tiff
19
+ ```
20
+
21
+ To enable the library, modify the cppjs.config.js file as shown below.
22
+ ```diff
23
+ +import tiff from '@cpp.js/package-tiff/cppjs.config.js';
24
+
25
+ export default {
26
+ dependencies: [
27
+ + tiff
28
+ ]
29
+ paths: {
30
+ config: import.meta.url,
31
+ }
32
+ };
33
+ ```
34
+
35
+ ## Usage
36
+ Below are the steps to use the tiff in your C++ or JavaScript code.
37
+
38
+ ### Usage in C++ Code
39
+ ```diff
40
+ +#include <tiffio.h>
41
+
42
+ std::string Native::sample() {
43
+ + return std::string(TIFFGetVersion());
44
+ }
45
+ ```
46
+
47
+ ## License
48
+ This project includes the precompiled tiff library, which is distributed under the [libtiff License](https://libtiff.gitlab.io/libtiff/project/license.html).
49
+
50
+ Tiff Homepage: [https://libtiff.gitlab.io/libtiff/index.html](https://libtiff.gitlab.io/libtiff/index.html)
package/cppjs.build.js ADDED
@@ -0,0 +1,8 @@
1
+ export default {
2
+ getURL: (version) => `https://download.osgeo.org/libtiff/tiff-${version}.tar.gz`,
3
+ buildType: 'cmake',
4
+ getBuildParams: () => [
5
+ '-Dtiff-tools=OFF', '-Dtiff-tests=OFF', '-Dtiff-contrib=OFF',
6
+ '-Dtiff-docs=OFF', '-Dld-version-script=OFF',
7
+ ],
8
+ };
@@ -0,0 +1,14 @@
1
+ import tiffWasmMultithread from '@cpp.js/package-tiff-wasm-multithread/cppjs.config.js';
2
+ import tiffAndroidMultithread from '@cpp.js/package-tiff-android-multithread/cppjs.config.js';
3
+ import tiffIosMultithread from '@cpp.js/package-tiff-ios-multithread/cppjs.config.js';
4
+
5
+ export default {
6
+ dependencies: [
7
+ tiffWasmMultithread,
8
+ tiffAndroidMultithread,
9
+ tiffIosMultithread,
10
+ ],
11
+ paths: {
12
+ config: import.meta.url
13
+ }
14
+ };
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@cpp.js/package-tiff-multithread",
3
+ "version": "2.0.0-beta.1",
4
+ "nativeVersion": "4.7.1",
5
+ "description": "This package provides the Tiff library compiled with Cpp.js, enabling fast and efficient image processing using the TIFF format. It is built with Cpp.js to provide cross-platform support, leveraging both WebAssembly (WASM) for web applications and native code for mobile platforms. Ideal for developers looking to handle TIFF images with high performance in JavaScript environments.",
6
+ "homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-package-tiff#readme",
7
+ "repository": "https://github.com/bugra9/cpp.js.git",
8
+ "type": "module",
9
+ "license": "libtiff",
10
+ "keywords": [
11
+ "tiff",
12
+ "libtiff",
13
+ "cpp.js-package",
14
+ "webassembly",
15
+ "react-native"
16
+ ],
17
+ "devDependencies": {
18
+ "cpp.js": "^2.0.0-beta.1",
19
+ "@cpp.js/package-tiff-wasm-multithread": "^2.0.0-beta.1",
20
+ "@cpp.js/package-tiff-android-multithread": "^2.0.0-beta.1",
21
+ "@cpp.js/package-tiff-ios-multithread": "^2.0.0-beta.1"
22
+ }
23
+ }