yuki-koyama / enhancer Goto Github PK
View Code? Open in Web Editor NEWA C++11 / GLSL library for enhancing photographs (adjusting brightness, contrast, etc.)
License: MIT License
A C++11 / GLSL library for enhancing photographs (adjusting brightness, contrast, etc.)
License: MIT License
The current code seems to be wrong in using a VAO.
Lift/Gamma/Gain is so expressive that some parameters are probably less useful in the case of Lift/Gamma/Gain is enabled. For example, Temperature/Tint can be disabled. Brightness/Contrast can also be disabled maybe.
GLM should be a natural choice for this kind of projects preparing with both C++ and GLSL APIs. Eigen is overkill.
In this code, vertex_shader
and fragment_shader
are newed but never deleted, which may cause memory leaks.
enhancer/src/enhancerwidget.cpp
Lines 68 to 77 in 8f70f2f
To fix this, simply using addShaderFromSourceFile
seems fine:
https://doc.qt.io/qt-5/qopenglshaderprogram.html#addShaderFromSourceFile
Something like this:
class EnhancerWidget: public QOpenGLWidget
{
public:
SetImage(const QImage& image);
SetParameters(const Eigen::VectorXd& parameters);
[...]
Currently, EnhancerWidget inserts black margins when the aspect ratio of the image is different from that of the widget, but this is not always suitable. It is better to support a "filling" mode as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.