heic-to 1.1.11 → 1.1.13
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/README.md +23 -1
- package/dist/csp/heic-to.js +1 -1
- package/dist/csp/heic-to.min.js +1 -1
- package/dist/heic-to.js +1 -1
- package/dist/heic-to.min.js +1 -1
- package/dist/iife/heic-to.js +113 -0
- package/esbuild.mjs +39 -4
- package/example/iife/app.js +26 -0
- package/example/iife/index.html +47 -0
- package/package.json +6 -6
- package/src/iife.js +5 -0
- package/src/lib/libheif-without-unsafe-eval.js +20 -20
- package/src/lib/libheif.js +20 -20
package/README.md
CHANGED
|
@@ -4,10 +4,12 @@ Convert HEIC/HEIF images to JPEG, PNG in browser using Javascript.
|
|
|
4
4
|
|
|
5
5
|
Inspired by [heic2any](https://github.com/alexcorvi/heic2any) and [libheif-web](https://github.com/joutvhu/libheif-web). The purpose of heic-to is to continuously follow up on releases of [libheif](https://github.com/strukturag/libheif) to be able to preview HEIC/HEIF images in browser.
|
|
6
6
|
|
|
7
|
-
Currently, heic-to is using [libheif 1.19.
|
|
7
|
+
Currently, heic-to is using [libheif 1.19.8](https://github.com/strukturag/libheif/releases/tag/v1.19.8) under the hood.
|
|
8
8
|
|
|
9
9
|
| Release | libheif |
|
|
10
10
|
| -------- | -------- |
|
|
11
|
+
| 1.1.13 | 1.19.8 |
|
|
12
|
+
| 1.1.12 | 1.19.7 |
|
|
11
13
|
| 1.1.11 | 1.19.7 |
|
|
12
14
|
| 1.1.10 | 1.19.7 |
|
|
13
15
|
| 1.1.9 | 1.19.7 |
|
|
@@ -72,6 +74,26 @@ Fix it by using `csp/heic-to`
|
|
|
72
74
|
+ import { heicTo } from "heic-to/csp"
|
|
73
75
|
```
|
|
74
76
|
|
|
77
|
+
#### Access global variable with IIFE build
|
|
78
|
+
|
|
79
|
+
If you would like to access heic-to with pure JavaScript without package builder like with CDN.
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<script src="https://cdn.jsdelivr.net/npm/heic-to@1.1.12/dist/iife/heic-to.js"></script>
|
|
83
|
+
<script>
|
|
84
|
+
/*...*/
|
|
85
|
+
if (await HeicTo.isHeic(file)) {
|
|
86
|
+
const jpeg = await HeicTo({
|
|
87
|
+
blob: file,
|
|
88
|
+
type: "image/jpeg",
|
|
89
|
+
quality: 0.5
|
|
90
|
+
})
|
|
91
|
+
/*...*/
|
|
92
|
+
}
|
|
93
|
+
/*...*/
|
|
94
|
+
</script>
|
|
95
|
+
```
|
|
96
|
+
|
|
75
97
|
### Development guide
|
|
76
98
|
|
|
77
99
|
#### How to fast test your changes on local?
|