-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8.jl
More file actions
42 lines (26 loc) · 728 Bytes
/
8.jl
File metadata and controls
42 lines (26 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#==============================================
8.jl
Read color image.
Convert color jpg to grayscale tif and bmp
Same the grayscales images
You run this in the Julia REPL with
include("8.jl")
You can run this from the command line with
julia 8.jl
30 November 2020
==============================================#
# These import and Pkg.add added 9 November 2020
import Pkg
using Pkg
Pkg.add("Images")
Pkg.add("ImageView")
Pkg.add("ImageMagick")
using Images, ImageView, FileIO
# Read the input image and display it
input_image = load("sillyName.jpg")
imshow(input_image)
output_image = Gray.(input_image)
imshow(output_image)
save("BWsillyName.tif", output_image)
save("BWsillyName.bmp", output_image)
# The End