Benign repos Download

bitmap.rs

Rust test marker or harnessimports image::codecs::bmp::BmpDecoder
SHA-256c763a3069fe4ac76c8d8ad0510136624b1557f28093bad955fbea0cec9d03f77

Evidence

imports image::codecs::bmp::BmpDecoder lines 1–38
1// Copyright 2018-2026 the Deno authors. MIT license.
2
3use std::cell::OnceCell;
4use std::cell::RefCell;
5use std::io::BufReader;
6use std::io::Cursor;
7
8use deno_core::GarbageCollected;
9use deno_core::JsBuffer;
10use deno_core::op2;
11use deno_core::webidl::WebIdlInterfaceConverter;
12use image::DynamicImage;
13use image::ImageDecoder;
14use image::RgbaImage;
15use image::codecs::bmp::BmpDecoder;
16use image::codecs::gif::GifDecoder;
17use image::codecs::ico::IcoDecoder;
18use image::codecs::jpeg::JpegDecoder;
19use image::codecs::png::PngDecoder;
20use image::codecs::webp::WebPDecoder;
21use image::imageops::FilterType;
22use image::imageops::overlay;
23use image::metadata::Orientation;
24
25use crate::ImageError;
26use crate::image_ops::create_image_from_raw_bytes;
27use crate::image_ops::premultiply_alpha as process_premultiply_alpha;
28use crate::image_ops::to_srgb_from_icc_profile;
29use crate::image_ops::unpremultiply_alpha;
30
31#[derive(Debug, PartialEq)]
⋯7 lines
English function-word token "that" lines 90–94
90:30… image
91 // > Blob .4
92 // > ... If this is an animated image, imageBitmap's bitmap data must only be taken from
93 // > the default image of the animation (the one that the format defines is to be used when animation is
94 // > not supported or is disabled), …
English function-word token "and" lines 95–97
95:15… ps://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html
96 //
97 // see also browser implementations: (The implementation of …
English function-word token "for" lines 543–547
543:21… e this can be GCed
544unsafe impl GarbageCollected for ImageBitmap {
545 fn trace(&self, _visitor: &mut deno_core::v8::cppgc::Visitor) {}
546
547 fn get_name …
imports super::* lines 581–597
581:8… data = self.data.borrow();
582 data.as_bytes().to_vec()
583 }
584}
585
586#[cfg(test)]
587mod tests {
588 use super::*;
589
590 #[test]
591 fn test_parse_args() {
592 let parsed_args = parse_args(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
⋯5 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.