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

Reduce file size of saved jpeg #75

Closed
RandallKent opened this issue Mar 6, 2021 · 5 comments · Fixed by #76
Closed

Reduce file size of saved jpeg #75

RandallKent opened this issue Mar 6, 2021 · 5 comments · Fixed by #76

Comments

@RandallKent
Copy link
Contributor

Allow users to reduce the file size of saved jpeg, by exposing ImwriteFlags in the config to enable togging jpeg optimization and adjusting the quality of the jpeg.

RandallKent added a commit to RandallKent/speed-camera that referenced this issue Mar 6, 2021
RandallKent added a commit to RandallKent/speed-camera that referenced this issue Mar 6, 2021
@RandallKent
Copy link
Contributor Author

@pageauc I see you merged #76 and but also updated the speed-cam.py#1355 to have logic that requires image_jpeg_optimize to be set to True in order for the image_jpeg_quality variable to take effect.

Your logic is incorrect.

Each flag is independent: optimization is different from compression (quality). Each can and should be able to be to configured separately.

The real file size savings comes from image_jpeg_quality therefore, a user should be able to set the quality of an image without setting image_jpeg_optimize to True.

@pageauc
Copy link
Owner

pageauc commented Mar 7, 2021 via email

@RandallKent
Copy link
Contributor Author

By setting the defaults within the speed-camera to match the defaults of OpenCV, we are effectively providing your desired functionality.

In other words, the feature is not toggled on unless it is changed from the default value. If the user leaves the default value, it's as if the feature is "disabled".

@pageauc
Copy link
Owner

pageauc commented Mar 7, 2021 via email

@pageauc
Copy link
Owner

pageauc commented Mar 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants