Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions examples/concat/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ use image::{GenericImage, GenericImageView, ImageBuffer, Pixel, Primitive};
/// cargo run --release --example concat
fn main() {
h_concat(&[
image::open("examples/concat/200x300.png").unwrap(),
image::open("examples/concat/300x300.png").unwrap(),
image::open("examples/concat/400x300.png").unwrap(),
image::open("examples/concat/200x300.png")
.unwrap()
.to_rgba8(),
image::open("examples/concat/300x300.png")
.unwrap()
.to_rgba8(),
image::open("examples/concat/400x300.png")
.unwrap()
.to_rgba8(),
])
.save("examples/concat/concatenated_900x300.png")
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples/opening.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::env;
use std::fs::File;
use std::path::Path;

use image::{GenericImageView, ImageFormat};
use image::ImageFormat;

fn main() {
let file = if env::args().count() == 2 {
Expand Down
4 changes: 3 additions & 1 deletion examples/tile/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use image::RgbaImage;

fn main() {
let mut img = RgbaImage::new(1920, 1080);
let tile = image::open("examples/scaleup/tinycross.png").unwrap();
let tile = image::open("examples/scaleup/tinycross.png")
.unwrap()
.to_rgba8();

image::imageops::tile(&mut img, &tile);
img.save("tiled_wallpaper.png").unwrap();
Expand Down
4 changes: 0 additions & 4 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,10 +1193,6 @@ where
P: Pixel,
Container: Deref<Target = [P::Subpixel]> + DerefMut,
{
fn get_pixel_mut(&mut self, x: u32, y: u32) -> &mut P {
self.get_pixel_mut(x, y)
}

fn put_pixel(&mut self, x: u32, y: u32, pixel: P) {
*self.get_pixel_mut(x, y) = pixel;
}
Expand Down
Loading
Loading