https://github.com/vadim-geroim/image-blur-1
Build an image by using a two-dimensional array to store the pixel values for the image.
https://github.com/vadim-geroim/image-blur-1
datastructures image-blur ruby
Last synced: 3 months ago
JSON representation
Build an image by using a two-dimensional array to store the pixel values for the image.
- Host: GitHub
- URL: https://github.com/vadim-geroim/image-blur-1
- Owner: vadim-geroim
- Created: 2019-07-28T15:41:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-15T23:21:57.000Z (over 5 years ago)
- Last Synced: 2025-01-13T08:12:32.182Z (5 months ago)
- Topics: datastructures, image-blur, ruby
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:```ruby
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
```