Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.

A UWP app that converts images to grayscale, with Fluent Design elements.

License

Notifications You must be signed in to change notification settings

matei-radu/grayscale-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grayscale Converter

A simple color-to-grayscale UWP C++ application with Fluent Design.

Screenshot

Screenshot

Formula

The gray color for each pixel is calculated according to the ITU-R Recommendation BT.709:

const double BLUE = 0.0722;
const double GREEN = 0.7152;
const double RED = 0.2126;

// Calculate color components.
double componentBlue = sourceBlue * BLUE;
double componentGreen = sourceGreen * GREEN;
double componentRed = sourceRed * RED;

// Calculate the Luma component (gray).
byte componentLuma = (componentBlue + componentGreen + componentRed);

// Assign the Luma component to each primary.
byte newBlue = componentLuma;
byte newGreen = componentLuma;
byte newRed = componentLuma;

Future developments

Some features would be nice to implement and I will eventually do:

  • Drag n drop

Requirements

In order to build and deploy the app, the following requirements must be met:

  • Microsoft Visual Studio 2017 with Universal Windows App Development Tools
  • Target platform version: 10.0.16299.0
  • Target platform min. version: 10.0.14393.0
  • A Windows 10 device

License

Copyright(C) 2016, 2017 Matei Bogdan Radu

This program is free software : you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

A UWP app that converts images to grayscale, with Fluent Design elements.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages