Skip to content

JaimeCarpintero/BorderTrimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BorderTrimmer

Image border trimmer using a line scan based approach

Simple project to remove the borders of an image. The borders must be row/column aligned and they must be of a known RGB color. A Visual Studio solution is provided along with sample images that can be used as reference.

Requirements

The Solution was generated using the following tools:

  1. Microsoft Visual Studio Community 2019
  2. Windows SDK Version 10.0
  3. stb library was used as interface to load/write images in png and jpg formats. https://github.com/nothings/stb

Usage

The application receives 5 parameters as input

  1. Filepath to the image with border
  2. Red value of border color (0-255)
  3. Green value of border color (0-255)
  4. Blue value of border color (0-255)
  5. Filepath to the borderless image

e.g D:\myFolder\imageWithBorder.png 100 120 130 D:\myFolder\borderlessImage.png

When launching the application inside Visual Studio, it is possible to supply the required command arguments via the solution properties, refer to the image below.

If the application is built, you can locate the executable file in the BorderTrimmer\x64\ and going inside the Release or Debug folder depending of the selected build type

Next open a Windows CMD terminal and proceed to launch the application by typing the desired command, use the following as reference:

The expeced result is shown below:

About

Image border trimmer using a line scan based approach

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published