Skip to content

Commit

Permalink
Updated documentation about using Photon with Cloudflare Workers
Browse files Browse the repository at this point in the history
  • Loading branch information
silvia-odwyer committed Feb 20, 2025
1 parent 5bc4750 commit a5aeb39
Show file tree
Hide file tree
Showing 55 changed files with 7,402 additions and 956 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings
args: --all-features --
wasm32:
name: Wasm32 check
runs-on: ubuntu-latest
Expand Down
17 changes: 7 additions & 10 deletions crate/src/monochrome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ pub fn sepia(img: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -145,7 +144,6 @@ pub fn grayscale(img: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -177,7 +175,6 @@ pub fn grayscale_human_corrected(img: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -213,7 +210,7 @@ pub fn desaturate(img: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
///
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -249,7 +246,7 @@ pub fn decompose_min(img: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
///
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -286,7 +283,7 @@ pub fn decompose_max(img: &mut PhotonImage) {
/// # Arguments
/// * `photon_image` - A PhotonImage.
/// * `num_shades` - The number of grayscale shades to be displayed in the image.
///
/// # Example
///
/// ```no_run
Expand Down Expand Up @@ -325,7 +322,7 @@ pub fn grayscale_shades(photon_image: &mut PhotonImage, num_shades: u8) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
///
/// # Example
///
/// ```no_run
Expand All @@ -344,7 +341,7 @@ pub fn r_grayscale(photon_image: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
///
/// # Example
///
/// ```no_run
Expand All @@ -363,7 +360,7 @@ pub fn g_grayscale(photon_image: &mut PhotonImage) {
///
/// # Arguments
/// * `photon_image` - A PhotonImage.
///
/// # Example
///
/// ```no_run
Expand All @@ -383,7 +380,7 @@ pub fn b_grayscale(photon_image: &mut PhotonImage) {
/// # Arguments
/// * `photon_image` - A PhotonImage.
/// * `channel` - A usize representing the channel from 0 to 2. O represents the Red channel, 1 the Green channel, and 2 the Blue channel.
///
/// # Example
/// To grayscale using only values from the Red channel:
/// ```no_run
Expand Down
4 changes: 2 additions & 2 deletions crate/src/multiple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ pub fn blend(
// source_canvas: HtmlCanvasElement,
// overlay_img: HtmlImageElement,
// blend_mode: &str) {

//
// let ctx = source_canvas
// .get_context("2d").unwrap()
// .unwrap()
// .dyn_into::<web_sys::CanvasRenderingContext2d>().unwrap();

//
// ctx.draw_image_with_html_image_element(&overlay_img, 0.0, 0.0);
// ctx.set_global_composite_operation(blend_mode);
// ctx.set_global_alpha(1.0);
Expand Down
Loading

0 comments on commit a5aeb39

Please sign in to comment.