1
- import { loadImage , loadImageBytes } from '../../image .ts'
1
+ import { loadImage , loadImageBytes } from 'https://deno.land/x/[email protected] /mod .ts'
2
2
import { Image } from 'https://cdn.deno.land/imagescript/versions/1.2.0/raw/mod.ts' ; // library for image manipulations
3
3
4
4
const url = 'https://api.creativecommons.engineering/v1/thumbs/c8fe5f5b-cc1a-4794-91c5-7488c60f4914'
@@ -7,13 +7,13 @@ const url3 = 'https://i.giphy.com/media/5wWf7HapUvpOumiXZRK/giphy.gif'
7
7
8
8
// Can specify a filename to rename the image
9
9
// (image url, path to save image, image to save name)
10
- loadImage ( url , './examples/image/' , 'cat' )
10
+ await loadImage ( url , './examples/image/' , 'cat' )
11
11
12
12
// Image will be saved with the default name if not included
13
- loadImage ( url2 , './examples/image/' )
13
+ await loadImage ( url2 , './examples/image/' )
14
14
15
15
// Can load gifs, pngs, jpgs
16
- loadImage ( url3 , './examples/image/' , 'cat-gif' )
16
+ await loadImage ( url3 , './examples/image/' , 'cat-gif' )
17
17
18
18
// Image manipulation example - reading from a file
19
19
const bytes = await Deno . readFile ( './examples/image/cat.jpeg' ) // local file
0 commit comments