Skip to content
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

JpegImageConverter plugin, JPEG support in StbImageConverter #26

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

mosra
Copy link
Owner

@mosra mosra commented Nov 27, 2016

A new plugin creating JPEGs out of your 8-bit RGB and grayscale image data. The test is failing on small input (while I'm pretty sure it works on larger input), needs further investigation.

Opening a PR in case someone finds this code handy (and also so it doesn't get lost in my abandoned branches).

TODO:

  • Update copyright year!
  • Make it build on the CI with just DebugTools enabled and not all its optional dependencies
  • Implement JPEG detection in AbstractImageConverter (note to self: there's a jpeg branch of magnum for this) mosra/magnum@c60217a

@mosra mosra added the feature label Nov 27, 2016
@mosra mosra mentioned this pull request Jul 25, 2018
56 tasks
@mosra mosra force-pushed the jpegimageconverter branch from 4a6a8bb to 98a1395 Compare July 26, 2018 18:24
@mosra mosra added this to the 2018.0c milestone Jul 26, 2018
@mosra
Copy link
Owner Author

mosra commented Jul 26, 2018

Revived this PR now, hopefully on track for 2018.08.

Turns out the original code was not taking pixel storage properties correctly into account, which explains the huge perceived difference in output. Now testing both with "ground truth" data and using DebugTools::CompareImage to ensure reasonable error margin when the output is with 100% quality setting. After stb_image_write update, part of this PR is also JPEG support in StbImageConverter.

The main blocker now is an ability to find DebugTools without requiring all optional dependencies it has so the CI doesn't need to spend time building things that are not needed.

@mosra mosra self-assigned this Jul 26, 2018
@mosra mosra changed the title [WIP] JpegImageConverter plugin [WIP] JpegImageConverter plugin, JPEG support in StbImageConverter Jul 26, 2018
@mosra mosra mentioned this pull request Jul 27, 2018
21 tasks
@mosra mosra force-pushed the jpegimageconverter branch from 98a1395 to bac1eb8 Compare August 5, 2018 20:09
@mosra
Copy link
Owner Author

mosra commented Aug 5, 2018

In order to unblock the progress, I merged the majority of the additions into master (e2c4ae2...b40ef6f). The only remaining bit is the additional check using DebugTools::CompareImage, blocked by the above.

@codecov-io
Copy link

codecov-io commented Aug 5, 2018

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   89.12%   89.12%           
=======================================
  Files          43       43           
  Lines        4265     4265           
=======================================
  Hits         3801     3801           
  Misses        464      464
Impacted Files Coverage Δ
src/MagnumPlugins/ColladaImporter/Utility.h 100% <ø> (ø) ⬆️
src/MagnumPlugins/ColladaImporter/ColladaType.h 100% <ø> (ø) ⬆️
.../MagnumPlugins/ColladaImporter/ColladaImporter.cpp 92.81% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35ee1a2...228e2d4. Read the comment docs.

@mosra mosra force-pushed the jpegimageconverter branch 4 times, most recently from 07fe612 to b8466fc Compare August 29, 2018 13:01
…put.

Uses DebugTools::CompareImage to verify the converted output is not too
far from the input.
@mosra mosra force-pushed the jpegimageconverter branch from b8466fc to 228e2d4 Compare August 31, 2018 09:52
@mosra mosra merged commit 228e2d4 into master Aug 31, 2018
@mosra mosra changed the title [WIP] JpegImageConverter plugin, JPEG support in StbImageConverter JpegImageConverter plugin, JPEG support in StbImageConverter Aug 31, 2018
@mosra mosra deleted the jpegimageconverter branch August 31, 2018 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants