-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add ability to configure jpeg optimize and quality #76
Conversation
Also I don't see an
if image_jpeg_optimize and image_format == ".jpg":
quality save
else:
default save (no quality)
Images can also be saved as png so this way avoids crashing png image saves.
Thanks Claude ...
…On Sat, Mar 6, 2021 at 12:03 PM Claude Pageau ***@***.***> wrote:
The image is a video stream frame. Have you actually seen a difference in
quality. Normally higher quality would be a larger value why default of 50.
Does this work on lower versions of opencv for python2 and 3.
Thanks for your contribution but just want some more information about the
change. I assume writing jpg would not be too much slower.
Claude ...
On Sat, Mar 6, 2021 at 9:30 AM Randall Kent ***@***.***>
wrote:
> closes #75 <#75>
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> #76
> Commit Summary
>
> - Add ability to configure jpeg optimize and quality
>
> File Changes
>
> - *M* config.py
> <https://github.com/pageauc/speed-camera/pull/76/files#diff-117426151e93a626f8b46bfdb3a95b3f4a62e5f4dd6e65975a7c50759bf04482>
> (2)
> - *M* speed-cam.py
> <https://github.com/pageauc/speed-camera/pull/76/files#diff-41e47bdf4aa7404620b42887f5cbc2b8939bf5843797193aff677808443bafc4>
> (6)
>
> Patch Links:
>
> - https://github.com/pageauc/speed-camera/pull/76.patch
> - https://github.com/pageauc/speed-camera/pull/76.diff
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#76>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABNPKZAKGLFOZ3CEBH2IWPLTCI4ABANCNFSM4YWY674Q>
> .
>
--
YouTube Channel at https://www.youtube.com/user/pageaucp
<http://www.youtube.com/user/pageaucp>
GitHub Repository at https://github.com/pageauc
--
YouTube Channel at https://www.youtube.com/user/pageaucp
<http://www.youtube.com/user/pageaucp>
GitHub Repository at https://github.com/pageauc
|
47de41a
to
ff8b732
Compare
I don't notice a difference visually when going down to This isn't an area I'm super familiar with but from what I've read, this should work on lower versions. Additionally, when running on my environment, I can't get it to save anything other than a JPEG so figured that was a deprecated feature. |
Default jpg image quality for imwrite is 95 so saving at 50 would result in
smaller images. In order to merge this
You will need to add if else per my previous example. This will allow
adjusting jpg quality without affecting png files
I would still like this option to default to False since most users would
prefer the png or jpg option at 95 quality
Claude ...
…On Sat, Mar 6, 2021 at 3:13 PM Randall Kent ***@***.***> wrote:
I don't notice a difference visually when going down to 50. The file size
is ~65% smaller though.
This isn't an area I'm super familiar with but from what I've read, this
should work on lower versions. Additionally, when running on my
environment, I can't get it to save anything other than a JPEG so figured
that was a deprecated feature.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNPKZH6SVILC6VNOFOY5L3TCKEH3ANCNFSM4YWY674Q>
.
--
YouTube Channel at https://www.youtube.com/user/pageaucp
<http://www.youtube.com/user/pageaucp>
GitHub Repository at https://github.com/pageauc
|
Yes - Smaller image file sizes are the point 😄 Made your requested changes |
8e996a7
to
812ccf8
Compare
Just a reminder that the variable 'image_jpeg_optimize' will not be used in your current pull request. This means all jpg, jpeg images will be optimized/compressed so no chance for anyone to suppress this feature. I will merge this request but add this check to the if statement after the merge, unless you want to modify your pull request again. |
I'm not following you. Why would Perhaps you can comment directly on the code or if you have suggested changes, commit them to the fork which will make them a part of this PR? |
closes #75