@bytescale/sdk 3.4.2 โ 3.4.4
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 +51 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ If you'd prefer to use a script tag:
|
|
|
69
69
|
<script src="https://js.bytescale.com/sdk/v3"></script>
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
## Uploading Files
|
|
72
|
+
## Uploading Files โ [Try on CodePen](https://codepen.io/bytescale/pen/abVapaJ?editors=1010)
|
|
73
73
|
|
|
74
74
|
This library is isomorphic, meaning you can upload files from Node.js, or the browser, or both.
|
|
75
75
|
|
|
@@ -351,12 +351,61 @@ folderApi
|
|
|
351
351
|
);
|
|
352
352
|
```
|
|
353
353
|
|
|
354
|
-
##
|
|
354
|
+
## ๐ Bytescale SDK API Reference
|
|
355
355
|
|
|
356
356
|
For a complete list of operations, please see:
|
|
357
357
|
|
|
358
358
|
**[Bytescale JavaScript SDK Docs ยป](https://www.bytescale.com/docs/sdks/javascript)**
|
|
359
359
|
|
|
360
|
+
## ๐ Media Processing APIs (Image/Video/Audio)
|
|
361
|
+
|
|
362
|
+
Bytescale provides several real-time [Media Processing APIs](https://www.bytescale.com/docs/media-processing-apis):
|
|
363
|
+
|
|
364
|
+
- **[Image Processing APIs](https://www.bytescale.com/docs/image-processing-api)** ([resize](https://www.bytescale.com/docs/image-processing-api#image-resizing-api), [crop](https://www.bytescale.com/docs/image-processing-api#image-cropping-api), [convert](https://www.bytescale.com/docs/image-processing-api#f), [compress](https://www.bytescale.com/docs/image-processing-api#image-compression-api) & [watermark](https://www.bytescale.com/docs/image-processing-api#Text-layering-api))
|
|
365
|
+
- **[Video Processing APIs](https://www.bytescale.com/docs/video-processing-api)** ([transcode](https://www.bytescale.com/docs/video-processing-api#video-transcoding-api), [optimize](https://www.bytescale.com/docs/video-processing-api#video-compression-api), [resize](https://www.bytescale.com/docs/video-processing-api#video-resizing-api) & [extract metadata](https://www.bytescale.com/docs/video-processing-api#video-metadata-api))
|
|
366
|
+
- **[Audio Processing APIs](https://www.bytescale.com/docs/audio-processing-api)** ([transcode](https://www.bytescale.com/docs/audio-processing-api#audio-transcoding-api), [optimize](https://www.bytescale.com/docs/audio-processing-api#audio-compression-api), [trim](https://www.bytescale.com/docs/audio-processing-api#audio-trimming-api) & [extract metadata](https://www.bytescale.com/docs/audio-processing-api#audio-metadata-api))
|
|
367
|
+
|
|
368
|
+
### Image Processing API (Original Image)
|
|
369
|
+
|
|
370
|
+
Here's an example using [a photo of Chicago](https://upcdn.io/W142hJk/raw/example/city-landscape.jpg):
|
|
371
|
+
|
|
372
|
+
<img src="https://upcdn.io/W142hJk/raw/example/city-landscape.jpg" />
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
https://upcdn.io/W142hJk/raw/example/city-landscape.jpg
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Image Processing API (Transformed Image)
|
|
379
|
+
|
|
380
|
+
Using the [Image Processing API](https://www.bytescale.com/docs/image-processing-api), you can produce [this image](https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400):
|
|
381
|
+
|
|
382
|
+
<img src="https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400" />
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
https://upcdn.io/W142hJk/image/example/city-landscape.jpg
|
|
386
|
+
?w=900
|
|
387
|
+
&h=600
|
|
388
|
+
&fit=crop
|
|
389
|
+
&f=webp
|
|
390
|
+
&q=80
|
|
391
|
+
&blur=4
|
|
392
|
+
&text=WATERMARK
|
|
393
|
+
&layer-opacity=80
|
|
394
|
+
&blend=overlay
|
|
395
|
+
&layer-rotate=315
|
|
396
|
+
&font-size=100
|
|
397
|
+
&padding=10
|
|
398
|
+
&font-weight=900
|
|
399
|
+
&color=ffffff
|
|
400
|
+
&repeat=true
|
|
401
|
+
&text=Chicago
|
|
402
|
+
&gravity=bottom
|
|
403
|
+
&padding-x=50
|
|
404
|
+
&padding-bottom=20
|
|
405
|
+
&font=/example/fonts/Lobster.ttf
|
|
406
|
+
&color=ffe400
|
|
407
|
+
```
|
|
408
|
+
|
|
360
409
|
## Authorization
|
|
361
410
|
|
|
362
411
|
The Bytescale JavaScript SDK supports two types of authorization:
|