Last active
December 8, 2022 13:14
-
-
Save ashwanirathee/b64aed455f0fb73b671b97f2b0954c5e to your computer and use it in GitHub Desktop.
Float Matrix to RGB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Executing task: julia --color=yes --threads=auto --project=/home/ashwani/.julia/environments/v1.7 /home/ashwani/learnhpc/test.jl | |
result = RGB{Float64}[RGB{Float64}(0.5,0.5,0.5) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.5,0.5,0.5) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(1.0,1.0,1.0) RGB{Float64}(0.5,0.5,0.5) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.5,0.5,0.5)] | |
eltype(result) = RGB{Float64} | |
size(result) = (10, 12) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Images | |
img = [ | |
0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.5 1.0 1.0 1.0 1.0 1.0 1.0 0.5 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | |
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 | |
] | |
result = RGB.(img) | |
@show result | |
@show eltype(result) | |
@show size(result) | |
result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment