-
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
Reduce file size of saved jpeg #75
Comments
@pageauc I see you merged #76 and but also updated the speed-cam.py#1355 to have logic that requires 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 |
Yes after looking more closely at the docs I see that optionize parameter
can be toggled on or off. I just want to be able to toggle the feature on
or off so maybe another boolean
to enable or disable the quality/optimization ver of imwrite.
How about
image_jpg_custom_on = False # Allow custom jpg settings for quality and
image optimization.
This would allow customization of quality or optimization.
…On Sun, Mar 7, 2021 at 11:50 AM Randall Kent ***@***.***> wrote:
@pageauc <https://github.com/pageauc> I see you merged #76
<#76> and but also updated
the speed-cam.py#1355
<https://github.com/pageauc/speed-camera/blob/master/speed-cam.py#L1355>
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNPKZERHYHAHW3ZZSZLCFLTCOVE7ANCNFSM4YWY33CA>
.
--
YouTube Channel at https://www.youtube.com/user/pageaucp
<http://www.youtube.com/user/pageaucp>
GitHub Repository at https://github.com/pageauc
|
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". |
Ok. Thanks for your help. I have reverted change to your previous logic
and added comments
certainly your solution is simpler and fewer config.py variables.
I learned something today. I have enjoyed working with you and your
patience while I got up to speed.
Regards Claude ...
…On Sun, Mar 7, 2021 at 12:08 PM Randall Kent ***@***.***> wrote:
By setting the defaults within the speed-camera to match the defaults of
OpenCV
<https://docs.opencv.org/3.4/d8/d6a/group__imgcodecs__flags.html#ga292d81be8d76901bff7988d18d2b42ac>,
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".
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNPKZF3AUYX5FNWYCKSUNTTCOXJ3ANCNFSM4YWY33CA>
.
--
YouTube Channel at https://www.youtube.com/user/pageaucp
<http://www.youtube.com/user/pageaucp>
GitHub Repository at https://github.com/pageauc
|
Testing image optimize feature and image quality to my eye appears to be
sharper. Today was sunny. Images were quite clear with no noticeable blur.
Will do more testing especially during overcast periods which is quite
often at this time of year in Ontario Canada
Regards
Claude ...
…On Sun, Mar 7, 2021 at 12:33 PM Claude Pageau ***@***.***> wrote:
Ok. Thanks for your help. I have reverted change to your previous logic
and added comments
certainly your solution is simpler and fewer config.py variables.
I learned something today. I have enjoyed working with you and your
patience while I got up to speed.
Regards Claude ...
On Sun, Mar 7, 2021 at 12:08 PM Randall Kent ***@***.***>
wrote:
> By setting the defaults within the speed-camera to match the defaults of
> OpenCV
> <https://docs.opencv.org/3.4/d8/d6a/group__imgcodecs__flags.html#ga292d81be8d76901bff7988d18d2b42ac>,
> 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".
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#75 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABNPKZF3AUYX5FNWYCKSUNTTCOXJ3ANCNFSM4YWY33CA>
> .
>
--
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
|
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.
The text was updated successfully, but these errors were encountered: