diff --git a/src/ImageView.jl b/src/ImageView.jl index 758181f..2cb3f76 100644 --- a/src/ImageView.jl +++ b/src/ImageView.jl @@ -161,29 +161,25 @@ function imshow!(canvas::GtkObservables.Canvas, end # cache of the image plus downscaled versions -struct ImagePyramid - imgs::Vector -end - -ImagePyramid(img::AbstractMatrix) = ImagePyramid(Any[img]) +ImagePyramid(img::AbstractMatrix) = Any[img] function ImagePyramid(img::Observable) - pyr = ImagePyramid(Any[img[]]) + pyr = Any[img[]] on(img) do image - push!(empty!(pyr.imgs),image) + push!(empty!(pyr),image) end pyr end -function get_image(p::ImagePyramid, i) - while length(p.imgs) 2*Graphics.height(cnvs) && imgsz[2] > 2*Graphics.width(cnvs)) i=i+1