Skip to content

Latest commit

 

History

History

array-cropper

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

You need to crop an array of ints, such as if it is an image and you want to crop a specific segment from it in the graphics editor to remove the maximum amount of the background and leave only the object you interested in.

The background consists of 0.
The object consists of 1.

For example the Array:

  {0,1,0,0},
  {0,0,1,0},
  {1,1,1,0},
  {0,0,0,0}

After the cropping will look like:

  {0,1,0},
  {0,0,1},
  {1,1,1}