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

Allow the ability to set the quality of jpegs. #125

Merged
merged 3 commits into from
Sep 18, 2020

Conversation

JimBobSquarePants
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Introduces the ability to set the quality of jpegs per request. Commands are sent in the following manner.

See Discussion #123 for reference.

{PATH_TO_YOUR_IMAGE}?quality=50
{PATH_TO_YOUR_IMAGE}?format=jpg&quality=50

As we introduce image other image formats that support variable quality we can create format specific quality parsers that will not conflict with this one allowing the sharing of the same command key.

image

@JimBobSquarePants JimBobSquarePants added this to the 1.0.0 milestone Sep 17, 2020
@JimBobSquarePants JimBobSquarePants changed the title Allow the ability to set the quaity of jpegs. Allow the ability to set the quality of jpegs. Sep 17, 2020
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #125 into master will increase coverage by 0.37%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   88.24%   88.61%   +0.37%     
==========================================
  Files          42       43       +1     
  Lines        1191     1221      +30     
  Branches      140      144       +4     
==========================================
+ Hits         1051     1082      +31     
  Misses        100      100              
+ Partials       40       39       -1     
Flag Coverage Δ
#unittests 88.61% <100.00%> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...mageSharp.Web/Middleware/ImageProcessingContext.cs 100.00% <ø> (ø)
...DependencyInjection/ServiceCollectionExtensions.cs 98.33% <100.00%> (+0.02%) ⬆️
src/ImageSharp.Web/FormattedImage.cs 96.42% <100.00%> (+11.81%) ⬆️
...rc/ImageSharp.Web/Processors/FormatWebProcessor.cs 100.00% <100.00%> (ø)
...ageSharp.Web/Processors/JpegQualityWebProcessor.cs 100.00% <100.00%> (ø)

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 f9d781a...f9ab719. Read the comment docs.

Copy link
Member

@tocsoft tocsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of questions/comments, but generally happy with as it unlock the scenario where a user can now switch out the encoder based on any custom logic they might want which is great.

@JimBobSquarePants JimBobSquarePants merged commit 2c5961e into master Sep 18, 2020
@JimBobSquarePants JimBobSquarePants deleted the js/jpeg-quality branch September 18, 2020 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants