@yoozsoft/yoozsoft-ng 5.0.1 → 5.0.3

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.
Files changed (27) hide show
  1. package/assets/js/UTIF.js-master/LICENSE +21 -21
  2. package/assets/js/UTIF.js-master/README.md +72 -72
  3. package/assets/js/UTIF.js-master/UTIF.js +1762 -1762
  4. package/assets/js/UTIF.js-master/package-lock.json +13 -13
  5. package/fesm2022/yoozsoft-yoozsoft-ng-datepicker.mjs +12 -12
  6. package/fesm2022/yoozsoft-yoozsoft-ng-datepicker.mjs.map +1 -1
  7. package/fesm2022/yoozsoft-yoozsoft-ng-file-upload.mjs +3 -3
  8. package/fesm2022/yoozsoft-yoozsoft-ng-file-upload.mjs.map +1 -1
  9. package/fesm2022/yoozsoft-yoozsoft-ng-footer.mjs +2 -2
  10. package/fesm2022/yoozsoft-yoozsoft-ng-footer.mjs.map +1 -1
  11. package/fesm2022/yoozsoft-yoozsoft-ng-loading.mjs +2 -2
  12. package/fesm2022/yoozsoft-yoozsoft-ng-loading.mjs.map +1 -1
  13. package/fesm2022/yoozsoft-yoozsoft-ng-navbar.mjs +2 -2
  14. package/fesm2022/yoozsoft-yoozsoft-ng-navbar.mjs.map +1 -1
  15. package/fesm2022/yoozsoft-yoozsoft-ng-password-strength.mjs +2 -2
  16. package/fesm2022/yoozsoft-yoozsoft-ng-password-strength.mjs.map +1 -1
  17. package/fesm2022/yoozsoft-yoozsoft-ng-select.mjs +14 -9
  18. package/fesm2022/yoozsoft-yoozsoft-ng-select.mjs.map +1 -1
  19. package/fesm2022/yoozsoft-yoozsoft-ng-sidebar.mjs +2 -2
  20. package/fesm2022/yoozsoft-yoozsoft-ng-sidebar.mjs.map +1 -1
  21. package/fesm2022/yoozsoft-yoozsoft-ng-tiff-viewer.mjs +2 -2
  22. package/fesm2022/yoozsoft-yoozsoft-ng-tiff-viewer.mjs.map +1 -1
  23. package/fesm2022/yoozsoft-yoozsoft-ng-toast.mjs +2 -2
  24. package/fesm2022/yoozsoft-yoozsoft-ng-toast.mjs.map +1 -1
  25. package/fesm2022/yoozsoft-yoozsoft-ng.mjs.map +1 -1
  26. package/package.json +9 -9
  27. package/select/index.d.ts +6 -4
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2017 Photopea
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Photopea
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,72 +1,72 @@
1
- # UTIF.js
2
- A small, fast and advanced TIFF / EXIF (+ DNG, CR2, NEF and other TIFF-ish files) decoder and encoder. It is the main TIFF library for [Photopea image editor](https://www.photopea.com). Try to open your TIFF file with Photopea to see, if UTIF.js can parse it.
3
-
4
- * Supports Black & White, Grayscale, RGB and Paletted images
5
- * Supports Fax 3 and Fax 4 (CCITT), JPEG, LZW, PackBits and other compressions (1,3,4,5,6,7,8,32773,32809)
6
- * E.g. [this 8 MPix image](//www.photopea.com/api/img2/G4.TIF) with Fax 4 compression is just 56 kB ( [Open in Photopea](https://www.photopea.com?p=%7B%22files%22:%5B%22//www.photopea.com/api/img2/G4.TIF%22%5D%7D) )
7
-
8
- For RAW files, UTIF.js only decodes raw sensor data (and JPG previews, if there are any). It does not convert the raw data into a displayable image (RGBA). Such conversion is complex and out of scope of this library.
9
-
10
- ## Installation
11
-
12
- Download and include the `UTIF.js` file in your code.
13
-
14
- #### `UTIF.decode(buffer)`
15
- * `buffer`: ArrayBuffer containing TIFF or EXIF data
16
- * returns an array of "IFDs" (image file directories). Each IFD is an object, keys are "tXYZ" (XYZ is a TIFF tag number), values are values of these tags. You can get the the dimension (and other properties, "metadata") of the image without decompressing pixel data.
17
-
18
- #### `UTIF.decodeImage(buffer, ifd)`
19
- * `buffer`: ArrayBuffer containing TIFF or EXIF data
20
- * `ifd`: the element of the output of UTIF.decode()
21
- * If there is an image inside the IFD, it is decoded and three new properties are added to the IFD:
22
- * * `width`: the width of the image
23
- * * `height`: the height of the image
24
- * * `data`: decompressed pixel data of the image
25
-
26
- TIFF files may have various number of channels and various color depth. The interpretation of `data` depends on many tags (see the [TIFF 6 specification](http://www.npes.org/pdf/TIFF-v6.pdf)). The following function converts any TIFF image into a 8-bit RGBA image.
27
-
28
- #### `UTIF.toRGBA8(ifd)`
29
- * `ifd`: image file directory (element of "ifds" returned by UTIF.decode(), processed by UTIF.decodeImage())
30
- * returns Uint8Array of the image in RGBA format, 8 bits per channel (ready to use in context2d.putImageData() etc.)
31
-
32
- ### Example
33
-
34
- ```javascript
35
- function imgLoaded(e) {
36
- var ifds = UTIF.decode(e.target.response);
37
- UTIF.decodeImage(e.target.response, ifds[0])
38
- var rgba = UTIF.toRGBA8(ifds[0]); // Uint8Array with RGBA pixels
39
- console.log(ifds[0].width, ifds[0].height, ifds[0]);
40
- }
41
-
42
- var xhr = new XMLHttpRequest();
43
- xhr.open("GET", "my_image.tif");
44
- xhr.responseType = "arraybuffer";
45
- xhr.onload = imgLoaded; xhr.send();
46
- ```
47
- ## Use TIFF images in HTML
48
-
49
- If you are not a programmer, you can use TIFF images directly inside the `<img>` element of HTML. Then, it is enough to call `UTIF.replaceIMG()` once at some point.
50
-
51
- #### `UTIF.replaceIMG()`
52
- ```html
53
- <body onload="UTIF.replaceIMG()">
54
- ...
55
- <img src="image.tif" /> <img src="dog.tif" /> ...
56
- ```
57
- And UTIF.js will do the rest. Internally, the "src" attribute of the image will be replaced with a new URI of the image (base64-encoded PNG). Note, that you can also insert DNG, CR2, NEF and other raw images into HTML this way.
58
-
59
- ## Encoding TIFF images
60
-
61
- You should not save images into TIFF format in the 21st century. Save them as PNG instead (e.g. using [UPNG.js](https://github.com/photopea/UPNG.js)). If you still want to use TIFF format for some reason, here it is.
62
-
63
- #### `UTIF.encodeImage(rgba, w, h, metadata)`
64
- * `rgba`: ArrayBuffer containing RGBA pixel data
65
- * `w`: image width
66
- * `h`: image height
67
- * `metadata` [optional]: IFD object (see below)
68
- * returns ArrayBuffer of the binary TIFF file. No compression right now.
69
-
70
- #### `UTIF.encode(ifds)`
71
- * `ifds`: array of IFDs (image file directories). An IFD is a JS object with properties "tXYZ" (where XYZ are TIFF tags)
72
- * returns ArrayBuffer of binary data. You can use it to encode EXIF data.
1
+ # UTIF.js
2
+ A small, fast and advanced TIFF / EXIF (+ DNG, CR2, NEF and other TIFF-ish files) decoder and encoder. It is the main TIFF library for [Photopea image editor](https://www.photopea.com). Try to open your TIFF file with Photopea to see, if UTIF.js can parse it.
3
+
4
+ * Supports Black & White, Grayscale, RGB and Paletted images
5
+ * Supports Fax 3 and Fax 4 (CCITT), JPEG, LZW, PackBits and other compressions (1,3,4,5,6,7,8,32773,32809)
6
+ * E.g. [this 8 MPix image](//www.photopea.com/api/img2/G4.TIF) with Fax 4 compression is just 56 kB ( [Open in Photopea](https://www.photopea.com?p=%7B%22files%22:%5B%22//www.photopea.com/api/img2/G4.TIF%22%5D%7D) )
7
+
8
+ For RAW files, UTIF.js only decodes raw sensor data (and JPG previews, if there are any). It does not convert the raw data into a displayable image (RGBA). Such conversion is complex and out of scope of this library.
9
+
10
+ ## Installation
11
+
12
+ Download and include the `UTIF.js` file in your code.
13
+
14
+ #### `UTIF.decode(buffer)`
15
+ * `buffer`: ArrayBuffer containing TIFF or EXIF data
16
+ * returns an array of "IFDs" (image file directories). Each IFD is an object, keys are "tXYZ" (XYZ is a TIFF tag number), values are values of these tags. You can get the the dimension (and other properties, "metadata") of the image without decompressing pixel data.
17
+
18
+ #### `UTIF.decodeImage(buffer, ifd)`
19
+ * `buffer`: ArrayBuffer containing TIFF or EXIF data
20
+ * `ifd`: the element of the output of UTIF.decode()
21
+ * If there is an image inside the IFD, it is decoded and three new properties are added to the IFD:
22
+ * * `width`: the width of the image
23
+ * * `height`: the height of the image
24
+ * * `data`: decompressed pixel data of the image
25
+
26
+ TIFF files may have various number of channels and various color depth. The interpretation of `data` depends on many tags (see the [TIFF 6 specification](http://www.npes.org/pdf/TIFF-v6.pdf)). The following function converts any TIFF image into a 8-bit RGBA image.
27
+
28
+ #### `UTIF.toRGBA8(ifd)`
29
+ * `ifd`: image file directory (element of "ifds" returned by UTIF.decode(), processed by UTIF.decodeImage())
30
+ * returns Uint8Array of the image in RGBA format, 8 bits per channel (ready to use in context2d.putImageData() etc.)
31
+
32
+ ### Example
33
+
34
+ ```javascript
35
+ function imgLoaded(e) {
36
+ var ifds = UTIF.decode(e.target.response);
37
+ UTIF.decodeImage(e.target.response, ifds[0])
38
+ var rgba = UTIF.toRGBA8(ifds[0]); // Uint8Array with RGBA pixels
39
+ console.log(ifds[0].width, ifds[0].height, ifds[0]);
40
+ }
41
+
42
+ var xhr = new XMLHttpRequest();
43
+ xhr.open("GET", "my_image.tif");
44
+ xhr.responseType = "arraybuffer";
45
+ xhr.onload = imgLoaded; xhr.send();
46
+ ```
47
+ ## Use TIFF images in HTML
48
+
49
+ If you are not a programmer, you can use TIFF images directly inside the `<img>` element of HTML. Then, it is enough to call `UTIF.replaceIMG()` once at some point.
50
+
51
+ #### `UTIF.replaceIMG()`
52
+ ```html
53
+ <body onload="UTIF.replaceIMG()">
54
+ ...
55
+ <img src="image.tif" /> <img src="dog.tif" /> ...
56
+ ```
57
+ And UTIF.js will do the rest. Internally, the "src" attribute of the image will be replaced with a new URI of the image (base64-encoded PNG). Note, that you can also insert DNG, CR2, NEF and other raw images into HTML this way.
58
+
59
+ ## Encoding TIFF images
60
+
61
+ You should not save images into TIFF format in the 21st century. Save them as PNG instead (e.g. using [UPNG.js](https://github.com/photopea/UPNG.js)). If you still want to use TIFF format for some reason, here it is.
62
+
63
+ #### `UTIF.encodeImage(rgba, w, h, metadata)`
64
+ * `rgba`: ArrayBuffer containing RGBA pixel data
65
+ * `w`: image width
66
+ * `h`: image height
67
+ * `metadata` [optional]: IFD object (see below)
68
+ * returns ArrayBuffer of the binary TIFF file. No compression right now.
69
+
70
+ #### `UTIF.encode(ifds)`
71
+ * `ifds`: array of IFDs (image file directories). An IFD is a JS object with properties "tXYZ" (where XYZ are TIFF tags)
72
+ * returns ArrayBuffer of binary data. You can use it to encode EXIF data.