Encoding and decoding images in Rust
This report presents the forensic synthetic code analysis of image-rs/image, a Rust project with 5,818 GitHub stars. SynthScan v2.0 examined 45,477 lines of code across 142 source files, recording 206 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 4.7 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 206 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/limits.rs | 1 | //! Test enforcement of size and memory limits for various decoding APIs. | COMMENT |
| LOW | src/io.rs | 41 | COMMENT | |
| LOW | src/error.rs | 1 | //! Contains detailed error representation. | COMMENT |
| LOW | src/error.rs | 21 | /// The generic error type for image operations. | COMMENT |
| LOW | src/error.rs | 41 | COMMENT | |
| LOW | src/error.rs | 141 | } | COMMENT |
| LOW | src/error.rs | 161 | } | COMMENT |
| LOW | src/metadata.rs | 21 | COMMENT | |
| LOW | src/metadata.rs | 81 | Self::Rotate270 => 8, | COMMENT |
| LOW | src/color.rs | 101 | /// Another purpose is to advise users of a rough estimate of the accuracy and effort of the | COMMENT |
| LOW | src/color.rs | 261 | COMMENT | |
| LOW | src/lib.rs | 1 | //! # Overview | COMMENT |
| LOW | src/lib.rs | 21 | //! # fn main() -> Result<(), image::ImageError> { | COMMENT |
| LOW | src/lib.rs | 41 | //! let mut bytes: Vec<u8> = Vec::new(); | COMMENT |
| LOW | src/lib.rs | 61 | //! * [`GenericImage`] trait for a mutable image buffer. | COMMENT |
| LOW | src/lib.rs | 81 | //! # Ok(()) | COMMENT |
| LOW | src/lib.rs | 101 | //! # Ok(()) | COMMENT |
| LOW | src/lib.rs | 181 | COMMENT | |
| LOW | src/lib.rs | 201 | /// | `gif` | GIF | | COMMENT |
| LOW | src/lib.rs | 221 | /// _wrappers_, not direct re-exports, in either of the following cases: | COMMENT |
| LOW | src/lib.rs | 281 | // <https://github.com/GuillaumeGomez/doc-comment> | COMMENT |
| LOW | src/hooks.rs | 121 | /// | COMMENT |
| LOW | src/hooks.rs | 141 | /// | COMMENT |
| LOW | src/primitive_sealed.rs | 61 | impl BgraSwizzle for isize {} | COMMENT |
| LOW | src/primitive_sealed.rs | 81 | /// Returns the nearest value of `Self` to `value`. | COMMENT |
| LOW | src/traits.rs | 361 | // fact that `Self::Subpixel` is used for `TransformableSubpixel` from the bound on | COMMENT |
| LOW | src/traits.rs | 441 | /// A string that can help to interpret the meaning each channel | COMMENT |
| LOW | src/traits.rs | 461 | Self::Subpixel::DEFAULT_MAX_VALUE | COMMENT |
| LOW | src/animation.rs | 41 | /// Delay between the frames in milliseconds | COMMENT |
| LOW | src/animation.rs | 141 | COMMENT | |
| LOW | src/animation.rs | 161 | /// assert_eq!(delay_10ms, Delay::from_numer_denom_ms(30, 3)); | COMMENT |
| LOW | src/animation.rs | 181 | /// use std::time::Duration; | COMMENT |
| LOW | src/codecs/gif.rs | 1 | //! Decoding of GIF Images | COMMENT |
| LOW | src/codecs/tiff.rs | 201 | UnsupportedErrorKind::GenericFeature( | COMMENT |
| LOW | src/codecs/openexr.rs | 1 | //! Decoding of OpenEXR (.exr) Images | COMMENT |
| LOW | src/codecs/png.rs | 161 | .map(|x| f64::from(x.into_scaled()) / 100_000.0)) | COMMENT |
| LOW | src/codecs/png.rs | 701 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] | COMMENT |
| LOW | src/codecs/png.rs | 721 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] | COMMENT |
| LOW | src/codecs/farbfeld.rs | 1 | //! Decoding of farbfeld images | COMMENT |
| LOW | src/codecs/hdr/decoder.rs | 201 | /// Create a new decoder with the given spec compliance mode. | COMMENT |
| LOW | src/codecs/hdr/decoder.rs | 501 | pub struct HdrMetadata { | COMMENT |
| LOW | src/codecs/hdr/mod.rs | 1 | //! Decoding of Radiance HDR Images | COMMENT |
| LOW | src/codecs/webp/encoder.rs | 1 | //! Encoding of WebP images. | COMMENT |
| LOW | src/codecs/avif/yuv.rs | 261 | /// * `image`: see [YuvGrayImage] | COMMENT |
| LOW | src/codecs/avif/yuv.rs | 281 | /// * `range`: see [YuvIntensityRange] | COMMENT |
| LOW | src/codecs/avif/yuv.rs | 301 | /// | COMMENT |
| LOW | src/codecs/avif/yuv.rs | 1121 | COMMENT | |
| LOW | src/codecs/avif/yuv.rs | 1141 | /// # Arguments | COMMENT |
| LOW | src/codecs/avif/yuv.rs | 1161 | /// * `range`: see [YuvIntensityRange] | COMMENT |
| LOW | src/codecs/avif/mod.rs | 1 | //! Encoding of AVIF images. | COMMENT |
| LOW | src/codecs/jpeg/encoder.rs | 21 | COMMENT | |
| LOW | src/codecs/jpeg/encoder.rs | 61 | /// | COMMENT |
| LOW | src/codecs/jpeg/encoder.rs | 181 | COMMENT | |
| LOW | src/codecs/bmp/decoder.rs | 361 | COMMENT | |
| LOW | src/codecs/bmp/decoder.rs | 441 | #[default] | COMMENT |
| LOW | src/codecs/bmp/decoder.rs | 461 | /// bitmask bytes or palette). This is the minimum valid data_offset. | COMMENT |
| LOW | src/codecs/bmp/decoder.rs | 481 | Checkpoint { row: u32, x: u32, stream_pos: u64 }, | COMMENT |
| LOW | src/codecs/bmp/decoder.rs | 1161 | /// headers. If it returns an `UnexpectedEof` error, you can retry on the | COMMENT |
| LOW | src/codecs/bmp/decoder.rs | 1181 | /// // Phase 1: Read metadata (with retry on UnexpectedEof) | COMMENT |
| LOW | src/codecs/bmp/decoder.rs | 1461 | self.reader.seek(SeekFrom::Start(icc.profile_offset))?; | COMMENT |
| 143 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/animation.rs | 8 | /// An implementation dependent iterator, reading the frames as requested | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/rust.yml | 70 | # an emulated mips system. NOTE: you can also use this approach to test for | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/io/decoder.rs | 6 | /// The interface for `image` to utilize in reading image files. | COMMENT |