deno/ext/canvas
Nathan Whitaker 9379a74e08
Some checks are pending
ci / publish canary (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
chore: update to edition 2024 (#29923)
2025-07-02 17:59:39 -07:00
..
01_image.js fix(ext/canvas): createImageBitmap must ignore the Blob.type value (#28741) 2025-05-08 15:57:28 +02:00
Cargo.toml 2.4.0 (#29959) 2025-07-01 16:21:05 -04:00
image_ops.rs fix(ext/canvas): handle integer overflow in createImageBitmap (#28764) 2025-04-10 11:16:14 +05:30
lib.rs chore: update to edition 2024 (#29923) 2025-07-02 17:59:39 -07:00
op_create_image_bitmap.rs chore: update to edition 2024 (#29923) 2025-07-02 17:59:39 -07: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.