Skip to content

Commit

Permalink
Update WebPDecoder doc comments (#2335)
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia authored Oct 2, 2024
1 parent 9489d71 commit 236e07c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/codecs/dxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ impl<R: Read> ImageDecoder for DxtDecoder<R> {
/**
* Actual encoding/decoding logic below.
*/

type Rgb = [u8; 3];

/// decodes a 5-bit R, 6-bit G, 5-bit B 16-bit packed color value into 8-bit RGB
Expand Down
7 changes: 4 additions & 3 deletions src/codecs/webp/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ use crate::error::{DecodingError, ImageError, ImageResult};
use crate::image::{ImageDecoder, ImageFormat};
use crate::{AnimationDecoder, ColorType, Delay, Frame, Frames, RgbImage, Rgba, RgbaImage};

/// WebP Image format decoder. Currently only supports lossy RGB images or lossless RGBA images.
/// WebP Image format decoder.
///
/// Supports both lossless and lossy WebP images.
pub struct WebPDecoder<R> {
inner: image_webp::WebPDecoder<R>,
}

impl<R: BufRead + Seek> WebPDecoder<R> {
/// Create a new `WebPDecoder` from the Reader ```r```.
/// This function takes ownership of the Reader.
/// Create a new `WebPDecoder` from the Reader `r`.
pub fn new(r: R) -> ImageResult<Self> {
Ok(Self {
inner: image_webp::WebPDecoder::new(r).map_err(ImageError::from_webp_decode)?,
Expand Down

0 comments on commit 236e07c

Please sign in to comment.