Skip to content

Commit

Permalink
Revert "gpujpeg table quality should not be 0"
Browse files Browse the repository at this point in the history
This reverts commit 6eafbfc.

It is convenient to support quality 0, which is same as quality 0 (GIMP
produces same image for Q=0 and Q=1; libjpeg 9e uses clips quality
factor to range 1-100 (incl).
  • Loading branch information
MartinPulec committed May 31, 2023
1 parent 2f365e6 commit c87c3ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpujpeg_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ gpujpeg_encoder_encode(struct gpujpeg_encoder* encoder, struct gpujpeg_parameter
{
assert(param_image->comp_count == 1 || param_image->comp_count == 3 || param_image->comp_count == 4);
assert(param_image->comp_count <= GPUJPEG_MAX_COMPONENT_COUNT);
assert(param->quality >= 1 && param->quality <= 100);
assert(param->quality >= 0 && param->quality <= 100);
assert(param->restart_interval >= 0);
assert(param->interleaved == 0 || param->interleaved == 1);

Expand Down

0 comments on commit c87c3ab

Please sign in to comment.