Update to newer Images
This commit is contained in:
parent
02ddbc8381
commit
33e97ee49b
@ -66,9 +66,8 @@ function _initialize_backend(::GLVisualizeBackend; kw...)
|
|||||||
import GLVisualize: visualize
|
import GLVisualize: visualize
|
||||||
import Plots.GL
|
import Plots.GL
|
||||||
import UnicodeFun
|
import UnicodeFun
|
||||||
Plots.slice_arg(img::Images.AbstractImage, idx::Int) = img
|
Plots.slice_arg{C<:Colorant}(img::Matrix{C}, idx::Int) = img
|
||||||
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
||||||
is_marker_supported{Img<:Images.AbstractImage}(::GLVisualizeBackend, shape::Union{Vector{Img}, Img}) = true
|
|
||||||
is_marker_supported{C<:Colorant}(::GLVisualizeBackend, shape::Union{Vector{Matrix{C}}, Matrix{C}}) = true
|
is_marker_supported{C<:Colorant}(::GLVisualizeBackend, shape::Union{Vector{Matrix{C}}, Matrix{C}}) = true
|
||||||
is_marker_supported(::GLVisualizeBackend, shape::Shape) = true
|
is_marker_supported(::GLVisualizeBackend, shape::Shape) = true
|
||||||
const GL = Plots
|
const GL = Plots
|
||||||
@ -1145,10 +1144,7 @@ function _show(io::IO, ::MIME"image/png", plt::Plot{GLVisualizeBackend})
|
|||||||
GLWindow.render_frame(GLWindow.rootscreen(plt.o))
|
GLWindow.render_frame(GLWindow.rootscreen(plt.o))
|
||||||
GLWindow.swapbuffers(plt.o)
|
GLWindow.swapbuffers(plt.o)
|
||||||
buff = GLWindow.screenbuffer(plt.o)
|
buff = GLWindow.screenbuffer(plt.o)
|
||||||
png = Images.Image(map(RGB{U8}, buff),
|
png = map(RGB{U8}, buff)
|
||||||
colorspace = "sRGB",
|
|
||||||
spatialorder = ["y", "x"]
|
|
||||||
)
|
|
||||||
FileIO.save(FileIO.Stream(FileIO.DataFormat{:PNG}, io), png)
|
FileIO.save(FileIO.Stream(FileIO.DataFormat{:PNG}, io), png)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -66,8 +66,8 @@ PlotExample("Global",
|
|||||||
PlotExample("Images",
|
PlotExample("Images",
|
||||||
"Plot an image. y-axis is set to flipped",
|
"Plot an image. y-axis is set to flipped",
|
||||||
[:(begin
|
[:(begin
|
||||||
import Images
|
import FileIO
|
||||||
img = Images.load(Pkg.dir("PlotReferenceImages","Plots","pyplot","0.7.0","ref1.png"))
|
img = FileIO.load(Pkg.dir("PlotReferenceImages","Plots","pyplot","0.7.0","ref1.png"))
|
||||||
plot(img)
|
plot(img)
|
||||||
end)]
|
end)]
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user