Skip to content

Build an image by using a two-dimensional array to store the pixel values for the image.

Notifications You must be signed in to change notification settings

vadim-geroim/Image-Blur-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

README

TASK


Build a class that allows us to build a new image with the data we specify. Make it possible for the class to output the image to the screen.

Entry data:

image = Image.new([
  [0, 0, 0, 0],
  [0, 1, 0, 0],
  [0, 0, 0, 1],
  [0, 0, 0, 0]
])
image.output_image

EXECUTION


Prerequisites

Ruby version 2.5.3 is installed

Steps

From a terminal window navigate to the project directory and run

$ ruby ImageBlur.rb

Output

If not valid data provided for the constructor the output displays the following:

$ Please verify the data for matrix. It requires to be a two-dimentional array.

If valid data provided for the constructor the output displays the following:

0000
0100
0001
0000

About

Build an image by using a two-dimensional array to store the pixel values for the image.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages