-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brayns 300 replace free image #942
Conversation
Adrien4193
commented
Dec 7, 2021
•
edited
Loading
edited
- Image API implemented under brayns/utils/image.
- ImageCodec interface to register image formats using ImageCodecRegistry.
- JPEG and PNG support using stb_image.
- Removed brayns IBL from the build.
- Removed some parts of the texture API to be able to compile.
- Removed perceptualdiff
- Re-render test images with stbi and update image validation process.
- Enabled warnings for building tests.
retest this please |
retest this please |
static bool validate(const brayns::Image &image, | ||
const std::string &filename) | ||
{ | ||
std::cout << "Validation of image '" << filename << "'.\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these cout messages needed for tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah maybe not, there were some of them before and I replaced it by some debug info like the full file path of the template and the comparison between the evaluation and the threshold to have an idea of what is going on when a test fails.
You think it is better without ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the tests themselves should suffice. If we ever encounter a problem, we can manually add prints for debugging, but I think they are not necessary as part of the tests output
const brayns::Image &reference) | ||
{ | ||
auto evaluation = _evaluate(image, reference); | ||
std::cout << "Evaluation result: " << evaluation << ".\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these cout messages needed for tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah maybe not, there were some of them before and I replaced it by some debug info like the full file path of the template and the comparison between the evaluation and the threshold to have an idea of what is going on when a test fails.
You think it is better without ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the tests themselves should suffice. If we ever encounter a problem, we can manually add prints for debugging, but I think they are not necessary as part of the tests output
retest this please |
retest this please |
1 similar comment
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#pragma GCC diagnostic ignored "-Wmissing-field-initializers" | ||
|
||
#define STB_IMAGE_IMPLEMENTATION | ||
#include <deps/stb/stb_image.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stb should be linked as target, not included directly from the place where is downloaded
#include <cassert> | ||
|
||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not be needed when stb is included as target and its include directories included as SYSTEM
static bool validate(const brayns::Image &image, | ||
const std::string &filename) | ||
{ | ||
std::cout << "Validation of image '" << filename << "'.\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the tests themselves should suffice. If we ever encounter a problem, we can manually add prints for debugging, but I think they are not necessary as part of the tests output
const brayns::Image &reference) | ||
{ | ||
auto evaluation = _evaluate(image, reference); | ||
std::cout << "Evaluation result: " << evaluation << ".\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the tests themselves should suffice. If we ever encounter a problem, we can manually add prints for debugging, but I think they are not necessary as part of the tests output
* Image wrapper around stb implemented. * Improved a bit Image API. * Improved image API. * IBL migrated. * Removed texture loading from image. * Adding new features to Image. * FreeImage replaced by stbi. * Fix bugs. * Fixed warnings with asserts disabled. * Reverting IBL changes. * Removed pdiff. * Fixing bug. * Enable warnings in brayns/tests. * Re-render test images and remove unused ones. * Fixed path issue in tests. * Documentation of image API. * Fixing bug. * Moved some code to cpp files. * Fixed warning in release build. * Moved helper class inside cpp. * Adding debug options to tests. * New image validation system. * Create target for stb. * Trigger CI.
* Bumped Pillow and websockets version. (#922) * Code cleanup (#923) * Brayns 278 add mock requests in python tests (#924) * Brayns 285 fix logic issue in quanta jpeg stream (#925) * Brayns 286 fix python image method (#928) * Brayns 287 fix python entrypoint methods with one of schema (#929) * Loaders & CircuitExplorer refactoring (#927) * Fixed some typo's (#930) * Update AUTHORS.txt (#931) * Brayns 258 create a proper logging system for brayns (#932) * Frame export improvement and static global objects removal: (#933) * Removes CMake/common dependency from build system (#934) * Removed VRPN plugin and deps. (#935) * Brayns 295 rename brayns json macros to a more appropriate name (#936) * Fixes segfault due to global const std::strings (#939) * Map and unmap framebuffer added. (#940) * Fix entry points variable naming (#941) * Brayns 300 replace free image (#942) * Brayns 308 Code restructure (#943) * Brayns 315 2.0.0 release preparation (#944)