Yoshua
July 30, 2019, 1:54pm
1
Hello! I have problem with image manipulation.
I want to save a 3D image array in png format.
Also wanted to know how to plot an image with some function of ImageView or Image package.
Image encoding is RGB.
If anyone can help, thank you in advance.
What did you try so far? All this should Just Work. PNG is a 2d format but you’ll get a sequence of images when you save it.
Yoshua
July 30, 2019, 2:34pm
3
what I am trying to do is this:
save(“rgb.png”, img)
but, that gives error.
Also, i tried to imgshow to show the image, but gives the same error.
julia> using Colors, FileIO, ImageView
julia> img = rand(RGB, 200, 200, 5);
julia> imshow(img) # just works
Dict{String,Any} with 4 entries:
"gui" => Dict{String,Any}("window"=>GtkWindowLeaf(name="", parent, wi…
"roi" => Dict{String,Any}("redraw"=>68: "map(clim-mapped image, input…
"annotations" => 4: "input-3" = Dict{UInt64,Any}() Dict{UInt64,Any}
"clim" => 3: "CLim" = CLim{RGB{Float64}}(RGB{Float64}(0.0,0.0,0.0), RG…
julia> save("/tmp/img.png", img) # results in 5 files, one per frame
1 Like
Yoshua
September 2, 2019, 9:15pm
5
I @tim.holy have any change in save() function to png format? It’s giving error = “save not defined”!!! I just do “using FileIO” , but the error continues.
i just tried Tim’s code and it works. However there are a lot of external package dependencies. However, “the error continues” is not particularly helpful, please read the following and provide some more detail. My guess is that you have a package configuration problem of some sort, or even a missing package.
Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer.
Keywords are highlighted to make it easier to refer to specific points.
Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …