Skip to content

This simple application removes the gray-and-white grid backgrounds from non-transparent image files, converting them into .png images.

Notifications You must be signed in to change notification settings

mauricerizat/PNG-Grid-Background-Remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

PNG Grid Background Remover

This simple application removes the gray-and-white grid backgrounds from non-transparent image files, converting them into transparent .png images.

EXAMPLE RESULT:

Before After
butterfly butterflyTransparent

USE:

Step Image
Start the program by running the given executable (.exe) file. The following home screen should be displayed. To select an image, click the Select File button 1  home
The file selection window should appear. The program can only accept images file formats. If non-image files are selected, an error will occur. 2  selection
Once selected, a preview of the selected image should be displayed on screen. Now select the tolerance level for the grid. A higher tolerance will allow for more shades of white and gray to exist while a lower tolerance will remove all shades of white and gray in the image. 3  tolerance select
Now name your output file. The default value for the output file name is "defaultOutput". You do not need to suffix an extension for the file. The output image will be of .png format and will be located in the same folder as the selected input file. 4  named
Now click the Remove Grid Background button. This should initiate the grid removal process 5  select remove grid
During the grid removal process, the Remove Grid Background button will say PROCESSING... and the program window will remain disabled. 6  processing
Once the grid removal process is complete, an alert will be displayed 7  success
Your output image will be of .png format and will be located in the same folder as the input file. 9  directory

WORKING:

The program is very simple. It is made with python and the GUI is made with the help of tkinter.

How it removes grids is it checks every pixel's RGB values and see if it's range is within "tolerance-percent" of either (255, 255, 255) (white) or (204, 204, 204) (gray).

Therefore, if tolerance is 30% the check for each channel of each pixel is:

.7*255 < pixel < 1.3*255 and .7*204 < pixel < 1.3*204.

If this is the case, the pixel is made transparent by changing it's alpha to zero. If not, the pixel is rendered as original.

Desired future features:

  • Change values of colors to remove i.e. accomodate for when grid values aren't gray-and-white
  • Select area within which to not remove white and gray pixels - This is important because the program removes all white and gray pixels which may not be desirable in many cases.
  • Modern looking GUI
  • Progress bar
  • Use Multicore GPU processing to speed up processing for large images

Contact me at [email protected] to report bugs

About

This simple application removes the gray-and-white grid backgrounds from non-transparent image files, converting them into .png images.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages