0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 09:57:11 -05:00
deno/ext/canvas
Bartek Iwańczuk e4b8fa5f4f
fix: move extension file declarations to cli/tsc/dts (#28180)
This commits moves all `.d.ts` files from `ext/*` to `cli/tsc/dts`.

Due to TSC snapshot removal, `cargo publish` is now erroring out,
unable to find the declaration files. These files were moved to
"cli/tsc/dts", because it's much easier than keeping them in 
extension directories, while still providing them compressed 
or uncompressed depending on the build type.
2025-02-19 02:53:21 +01:00
..
01_image.js feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00
Cargo.toml 2.2.0 (#28175) 2025-02-18 23:12:17 +00:00
image_ops.rs feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00
lib.rs fix: move extension file declarations to cli/tsc/dts (#28180) 2025-02-19 02:53:21 +01:00
op_create_image_bitmap.rs feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00
README.md feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00

deno_canvas

Extension that implements various OffscreenCanvas related APIs.

Image processing architecture in Rust

flowchart LR
  Input["input binary<br/>( &[u8] )"]
  II["intermediate image<br/>( DynamicImage )"]
  Ops["processing pixel<br/>( ImageBuffer< P, S > )"]
  Output["output binary<br/>( Box<[u8]> )"]
  Input --> II
  II --> Ops --> II
  II --> Output

The architecture of image processing in Rust is rely on the structure of image crate.
If the input is a image of binary, it convert to an intermediate image (DynamicImage in image) with using a decoder corresponding to its image formats.
After converting to an intermediate image, it can process various way for example, to use the pixel processong operation imageops supplied by image.
On the other hand, there can also to implement your own pixel processong operation to refer to the implementation of imageops as here or image_ops.rs module.
You can treat any bit depth that supported by image with generics in the processing pixel layer.