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

Todo : find why STBI_ONLY_JPEG breaks Alignment mark #1779

Closed
nliaudat opened this issue Jan 6, 2023 · 7 comments
Closed

Todo : find why STBI_ONLY_JPEG breaks Alignment mark #1779

nliaudat opened this issue Jan 6, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@nliaudat
Copy link
Contributor

nliaudat commented Jan 6, 2023

The Feature

As mentionned in #1721 ,STBI_ONLY_JPEG breaks alignment marks

STBI_ONLY_JPEG can save 2% of Flash

Todo :
debug the alignment marks to find why ClassFlowAlignment.h is linked to stb_image.h

I did not find why :
ClassFlowAlignment.h includes CAlignAndCutImage.h
CAlignAndCutImage.h includes CImageBasis.h (works if STBI_ONLY_JPEG enabled)
CImageBasis.h includes stb_image.h ( works if STBI_ONLY_JPEG enabled)

@nliaudat nliaudat added the enhancement New feature or request label Jan 6, 2023
@caco3
Copy link
Collaborator

caco3 commented Jan 6, 2023

The images as seen in the Recognition page are stored on the sd-card as BMP images, see http://<IP>/fileserver/img_tmp/.

I guess thats the reason.

We should check with @jomjol what the reason to pick BMP is. Maybe it simply could be switched to JPG as well?

@jomjol
Copy link
Owner

jomjol commented Jan 8, 2023

Bitmaps are choosen, because I wanted to avoid lossed due to compression. If we would change the settings of the jpeg, that might work as well.

@caco3
Copy link
Collaborator

caco3 commented Jan 8, 2023

thanks!

I think if you set the jpeg compression to minimum it should be ok

@jomjol
Copy link
Owner

jomjol commented Jan 8, 2023

Would be needed to test.
BUT: if we remove the BMP option, we will loose the backward compatiblity, because up to now every image is stored as BMP.

@caco3
Copy link
Collaborator

caco3 commented Jan 9, 2023

I tested your PR #1789 and it works for me.

If it breaks the backwards compatibility,what impact does this have?
The recognition page seems to be ok after the first round.
And I like that the image are shown larger now.

@jomjol
Copy link
Owner

jomjol commented Jan 11, 2023

I checked everything and it does not break the backward compatility. I made a mistake while checking. So we can implement this change.

@nliaudat
Copy link
Contributor Author

fixed in #1789

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

No branches or pull requests

3 participants