JuliaGeometry / VoronoiDelaunay.jl

Fast and robust Voronoi & Delaunay tessellation creation with Julia
Other
123 stars 26 forks source link

LoadError: indexing Images.Image #19

Open Atraii opened 8 years ago

Atraii commented 8 years ago

The example file is no longer usable. With the latest master I'm getting:

LoadError: indexing Images.Image{ColorTypes.BGRA{FixedPointNumbers.UFixed{UInt8,8}},2,Array{ColorTypes.BGRA{FixedPointNumbers.UFixed{UInt8,8}},2}} with types Tuple{Tuple{Int64,Int64}} is not supported while loading In[1], in expression starting on line 9

If the @compat is removed, the code runs, but the output image is very wrong. Any ideas what is going on here?

Edit: info Using Julia v0.4.5.

juliohm commented 7 years ago

This issue is still valid in Julia v0.5.

lawless-m commented 2 years ago

For what it's worth 5 years later on Julia 1.6 .....

"imread" is now "load" in Images

the code runs but doesn't produce the example output

import VoronoiDelaunay: from_image, voronoiedges, getplotxy
import Images: load
import Gadfly: set_default_plot_size, plot, Geom, Scale, cm, draw, SVG, inch

img = load("julia.png")
# placing points in places that represent the image.
tess = from_image(img, 25000)

# making the plot
set_default_plot_size(30cm,15cm)
x, y = getplotxy(voronoiedges(tess))
p = plot(x=x, y=y, Geom.path, Scale.x_continuous(minvalue=1.0, maxvalue=2.0), Scale.y_continuous(minvalue=1.25, maxvalue=1.75))

# save as SVG
draw(SVG("voroimage.svg", 8inch, 4inch), p)