Add MemoizeImpure node and cache image base64 in graph (#1595)

* Cache base64 representation of images when converting to graphic group

* Fix build

* Fix build again

* Actually fix it this time

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2024-02-03 23:06:17 +01:00
parent 8fa46ba63a
commit 349ec5da72
12 changed files with 127 additions and 13 deletions

View File

@@ -111,6 +111,7 @@ fn sample(footprint: Footprint, image_frame: ImageFrame<Color>) -> ImageFrame<Co
width: new_width,
height: new_height,
data: vec,
base64_string: None,
};
// we need to adjust the offset if we truncate the offset calculation
@@ -750,7 +751,12 @@ fn mandelbrot_node(footprint: Footprint) -> ImageFrame<Color> {
}
}
ImageFrame {
image: Image { width, height, data },
image: Image {
width,
height,
data,
..Default::default()
},
transform: DAffine2::from_translation(offset) * DAffine2::from_scale(size),
..Default::default()
}