Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c05148

Browse files
authored
Merge pull request#2689 from image-rs/from-bgr
Adjust bounds on from_raw_rgb
2 parentsbf4ace6 +e40b3ce commit4c05148

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/images/buffer.rs‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,9 +1431,8 @@ impl<P: Pixel> ImageBuffer<P, Vec<P::Subpixel>> {
14311431

14321432
impl<S,Container>ImageBuffer<Rgb<S>,Container>
14331433
where
1434-
S:crate::Primitive +crate::traits::Enlargeable,
1435-
Rgb<S>:Pixel,
1436-
Container:DerefMut<Target =[<Rgb<S>asPixel>::Subpixel]>,
1434+
Rgb<S>:PixelWithColorType<Subpixel =S>,
1435+
Container:DerefMut<Target =[S]>,
14371436
{
14381437
/// Construct an image by swapping `Bgr` channels into an `Rgb` order.
14391438
pubfnfrom_raw_bgr(width:u32,height:u32,container:Container) ->Option<Self>{
@@ -1458,9 +1457,8 @@ where
14581457

14591458
impl<S,Container>ImageBuffer<Rgba<S>,Container>
14601459
where
1461-
S:crate::Primitive +crate::traits::Enlargeable,
1462-
Rgb<S>:Pixel,
1463-
Container:DerefMut<Target =[<Rgba<S>asPixel>::Subpixel]>,
1460+
Rgba<S>:PixelWithColorType<Subpixel =S>,
1461+
Container:DerefMut<Target =[S]>,
14641462
{
14651463
/// Construct an image by swapping `BgrA` channels into an `RgbA` order.
14661464
pubfnfrom_raw_bgra(width:u32,height:u32,container:Container) ->Option<Self>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp