1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 21:50:00 -05:00
denoland-deno/ext/canvas
2024-10-02 18:55:17 +09:00
..
01_image.js perf: return the value not a struct but a tuple 2024-09-29 23:05:03 +09:00
Cargo.toml switch to static link for lcms2 2024-09-15 14:07:37 +09:00
error.rs clean up 2024-09-08 20:09:49 +09:00
image_decoder.rs fix error handling 2024-09-08 21:32:22 +09:00
image_ops.rs image_ops takes responsibility of treat alpha channel 2024-09-29 13:53:19 +09:00
lib.deno_canvas.d.ts docs(ext/canvas): document public Canvas APIs (#24895) 2024-08-06 13:45:16 +09:00
lib.rs revert "support colorspaceConversion for ImageData" 2024-09-09 11:26:26 +09:00
op_create_image_bitmap.rs add unit test for imageOrientation 2024-10-02 18:55:17 +09:00
README.md update README 2024-09-08 21:32:34 +09: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.