Skip to content

Commit 67859e1

Browse files
authored
Merge pull request glium#1824 from est31/image_update
Update image to 0.23
2 parents 722834c + eea0b48 commit 67859e1

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ gl_generator = "0.14"
5353
rental = "0.5.4"
5454
cgmath = "0.17"
5555
genmesh = "0.6"
56-
image = "0.22"
56+
image = "0.23"
5757
obj = { version = "0.9", features = ["genmesh"] }
5858
rand = "0.7"
5959
libc = "0.2.62"

examples/blitting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919

2020
// building a texture with "OpenGL" drawn on it
2121
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
22-
image::PNG).unwrap().to_rgba();
22+
image::ImageFormat::Png).unwrap().to_rgba();
2323
let image_dimensions = image.dimensions();
2424
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
2525
let opengl_texture = glium::Texture2d::new(&display, image).unwrap();

examples/deferred.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ fn main() {
4040
let cb = glutin::ContextBuilder::new();
4141
let display = glium::Display::new(wb, cb, &event_loop).unwrap();
4242

43-
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]), image::PNG).unwrap().to_rgba();
43+
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
44+
image::ImageFormat::Png).unwrap().to_rgba();
4445
let image_dimensions = image.dimensions();
4546
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
4647
let opengl_texture = glium::texture::Texture2d::new(&display, image).unwrap();

examples/displacement_mapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn main() {
1616
let display = glium::Display::new(wb, cb, &event_loop).unwrap();
1717

1818
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
19-
image::PNG).unwrap().to_rgba();
19+
image::ImageFormat::Png).unwrap().to_rgba();
2020
let image_dimensions = image.dimensions();
2121
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
2222
let opengl_texture = glium::texture::CompressedSrgbTexture2d::new(&display, image).unwrap();

examples/fullscreen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222

2323
// building a texture with "OpenGL" drawn on it
2424
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
25-
image::PNG).unwrap().to_rgba();
25+
image::ImageFormat::Png).unwrap().to_rgba();
2626
let image_dimensions = image.dimensions();
2727
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
2828
let opengl_texture = glium::texture::CompressedTexture2d::new(&display, image).unwrap();

examples/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919

2020
// building a texture with "OpenGL" drawn on it
2121
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
22-
image::PNG).unwrap().to_rgba();
22+
image::ImageFormat::Png).unwrap().to_rgba();
2323
let image_dimensions = image.dimensions();
2424
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
2525
let opengl_texture = glium::texture::CompressedSrgbTexture2d::new(&display, image).unwrap();

examples/tutorial-06.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let display = glium::Display::new(wb, cb, &event_loop).unwrap();
1515

1616
let image = image::load(Cursor::new(&include_bytes!("../tests/fixture/opengl.png")[..]),
17-
image::PNG).unwrap().to_rgba();
17+
image::ImageFormat::Png).unwrap().to_rgba();
1818
let image_dimensions = image.dimensions();
1919
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
2020
let texture = glium::texture::Texture2d::new(&display, image).unwrap();

examples/tutorial-14.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ fn main() {
3131

3232

3333
let image = image::load(Cursor::new(&include_bytes!("../book/tuto-14-diffuse.jpg")[..]),
34-
image::JPEG).unwrap().to_rgba();
34+
image::ImageFormat::Jpeg).unwrap().to_rgba();
3535
let image_dimensions = image.dimensions();
3636
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
3737
let diffuse_texture = glium::texture::SrgbTexture2d::new(&display, image).unwrap();
3838

3939
let image = image::load(Cursor::new(&include_bytes!("../book/tuto-14-normal.png")[..]),
40-
image::PNG).unwrap().to_rgba();
40+
image::ImageFormat::Png).unwrap().to_rgba();
4141
let image_dimensions = image.dimensions();
4242
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dimensions);
4343
let normal_map = glium::texture::Texture2d::new(&display, image).unwrap();

0 commit comments

Comments
 (0)