-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: add exif based image rotation #37
Conversation
Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com>
Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com>
I've decoded the EXIF header generated by your tool manually and uploaded in a separate branch |
Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com>
@mryel00 can I update the PR with my branch? I would also like to move the header generation to a separate file for better testing. |
@roamingthings do whatever you want 😄 |
For your info: I'm using this branch right now for 1 week with no problems. |
Signed-off-by: Alexander Sparkowsky <info@roamingthings.de>
Signed-off-by: Alexander Sparkowsky <info@roamingthings.de>
Signed-off-by: Alexander Sparkowsky <info@roamingthings.de>
@Caouette1988 I updated this branch and would appreciate if you give it a try |
@mryel00 I've update the implementation. I'm not happy with the test setup I had to do. I will give it a closer look. However, the implementation of the feature should be fine. |
I just try to install it and it return some error.
|
Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com>
@Caouette1988 thank you for spotting that error. It should be fixed now |
Signed-off-by: Alexander Sparkowsky <info@roamingthings.de>
i install it yesterday, all work good. Obico too is working. |
@mryel00 I think this is ready for release. What do you think? |
@roamingthings I'm not sure if we need something like a fail check for the first image to check if there is already an EXIF header. I guess this might be just a simple check for the EXIF identifier in the first few bytes but I'm not completely sure about that and if we should really implement it as there shouldn't be one in nearly all scenarios. |
@mryel00 This would mean that picamera2 starts to embed EXIF data. I don't think that this will be an issue. |
@roamingthings Ok I thought I read something about that somewhere but I could be just wrong 😅 |
Well I think we would have to check the first few bytes for being an EXIF header. Shouldn't be that hard. |
Signed-off-by: mryel00 <58853838+mryel00@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go
This adds a basic exif based image rotation to solve #33.
Sending the exif header with the desired rotation before the frame will rotate the frame in all exif supporting browsers.
This adds the new cli parameter --orientation_exif and requires an integer based on the rotation desired.
In it's current form it always attaches the header, if the parameter is set. So there could be a case were the header is already there from the camera.
Signed-off-by: Patrick Gehrsitz 58853838+mryel00@users.noreply.github.com