let scale = 16;
let img: RgbImage = ({
let canvas_option = &mut *canvas0.lock().unwrap();
- Ok(apply_to_canvas( |c, d| rgb_encode_to_canvas(c, d), &mut canvas_option.0, Some((32, 32)), data)?.img.clone())
+ Ok(apply_to_canvas(rgb_encode_to_canvas, &mut canvas_option.0, Some((32, 32)), data)?.img.clone())
} as Result<RgbImage, CanvasError>)?;
let cursor = image_to_cursor(img, scale)?;
Ok(response_image!(cursor))
let data = extract_data!(req, 6);
let img: RgbImage = ({
let canvas_option = &mut *canvas1.lock().unwrap();
- Ok(apply_to_canvas( |c, d| rgb_encode_to_canvas(c, d), &mut canvas_option.0, Some((dim_x, dim_y)), data)?.img.clone())
+ Ok(apply_to_canvas(rgb_encode_to_canvas, &mut canvas_option.0, Some((dim_x, dim_y)), data)?.img.clone())
} as Result<RgbImage, CanvasError>)?;
let cursor = image_to_cursor(img, scale)?;
Ok(response_image!(cursor))
let data = extract_header!(req, "user-agent");
let img: RgbImage = ({
let canvas_option = &mut *canvas1.lock().unwrap();
- Ok(apply_to_canvas( |c, d| rgb_encode_to_canvas(c, d), &mut canvas_option.0, Some((dim_x, dim_y)), data)?.img.clone())
+ Ok(apply_to_canvas(rgb_encode_to_canvas, &mut canvas_option.0, Some((dim_x, dim_y)), data)?.img.clone())
} as Result<RgbImage, CanvasError>)?;
let cursor = image_to_cursor(img, scale)?;
Ok(response_image!(cursor))