Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump dependency image to 0.23.14 from 0.21.3 #74

Merged
merged 1 commit into from
Oct 23, 2021
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ memmap2 = "0.5.0"
rusttype = "0.8.2"
evdev = "0.11.1"
epoll = "4.1.0"
image = "0.21.3"
image = "0.23.14"
line_drawing = "0.8.0"
hlua = "0.4.1"
aabb-quadtree = "0.1.0"
Expand Down
4 changes: 3 additions & 1 deletion examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ fn on_zoom_out(app: &mut appctx::ApplicationContext<'_>, _element: UIElementHand
new_image.invert();

// Copy the resized image into the subimage
new_image.copy_from(&resized, CANVAS_REGION.width / 8, CANVAS_REGION.height / 8);
new_image
.copy_from(&resized, CANVAS_REGION.width / 8, CANVAS_REGION.height / 8)
.unwrap();

framebuffer.draw_image(
new_image.as_rgb8().unwrap(),
Expand Down
4 changes: 2 additions & 2 deletions examples/live.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ fn main() {
)
.unwrap();
let mut writer = BufWriter::new(Vec::new());
image::jpeg::JPEGEncoder::new(&mut writer)
image::jpeg::JpegEncoder::new(&mut writer)
.encode(
&*rgb888,
DISPLAYWIDTH.into(),
DISPLAYHEIGHT.into(),
image::ColorType::RGB(8),
image::ColorType::Rgb8,
)
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/appctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl<'a> ApplicationContext<'a> {
let framebuffer = self.get_framebuffer_ref();
let draw_area = match img {
image::DynamicImage::ImageRgb8(ref rgb) => framebuffer.draw_image(rgb, position),
other => framebuffer.draw_image(&other.to_rgb(), position),
other => framebuffer.draw_image(&other.to_rgb8(), position),
};
let marker = match refresh {
UIConstraintRefresh::Refresh | UIConstraintRefresh::RefreshAndWait => framebuffer
Expand Down
2 changes: 1 addition & 1 deletion src/framebuffer/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl<'a> framebuffer::FramebufferDraw for core::Framebuffer<'a> {
let pixel_pos = pos + vec2(x as i32, y as i32);
self.write_pixel(
pixel_pos.cast().unwrap(),
color::RGB(pixel.data[0], pixel.data[1], pixel.data[2]),
color::RGB(pixel.0[0], pixel.0[1], pixel.0[2]),
);
}
mxcfb_rect {
Expand Down