Ability to rotate a camera image by 90°

Feature description
Complementary to the previous request (already implemented) [Rotate a camera image by 180° - [Archive] Feature request - Gladys Assistant Community](https://community.gladysassistant.com/t/pouvoir-tourner-une-image-de-camera-a-

I know there wasn’t a vote but I wanted to do a little something.

Here’s what I did :



@lmilcent : Does this match your request?

4 Likes

The little PR that does the trick: https://github.com/GladysAssistant/Gladys/pull/1823

2 Likes

Thanks for the PR :pray:

I have some feedback — on my machine the PR doesn’t work because of a type conversion bug :slight_smile:

Absolutely! Depending on how I position my Raspberry Pi Camera, I need it to return to 90°.
Thank you for your work!

@lmilcent : Perfect :slight_smile:

[quote="pierre-gilles

Ok, I’ve retested and it works now!

However, I have a small issue: since the image is rotated, the final image size is larger than the maximum image size we allow (100KB instead of max 75KB)

I have this error:

2023-07-03T10:53:51+0200 <warn> poll.js:14 (RtspCameraHandler.poll) Unable to poll camera
2023-07-03T10:53:51+0200 <debug> poll.js:15 (RtspCameraHandler.poll) BadParameters [Error]: Image is too big
    at Camera.setImage (/Users/pierregilles/code/gladys/server/lib/device/camera/camera.setImage.js:18:11)
    at RtspCameraHandler.poll (/Users/pierregilles/code/gladys/server/services/rtsp-camera/lib/poll.js:12:37)
    at DeviceManager.poll (/Users/pierregilles/code/gladys/server/lib/device/device.poll.js:21:5)

If I download the image, I realize its dimension is « 1333 × 2000 », whereas normally, the max image size is:

  '-vf scale=640:-1', // resize the image with max width = 640

So this parameter no longer works when you add yours.

Regarding the « Delete » button, I added the resolution I had during my tests to reproduce it :slight_smile: (on the PR)

Yes we can’t put multiple « -vf » in the same command, I just made the change on the PR

A little CSS bug, just the way I like them :slight_smile:

1 Like

Thanks for the fixes @Lokkye, tested on my machine in real conditions, both with static images and live and it works perfectly :slight_smile:

Same for the delete button!

I’ve merged into master, it will be included in the next Gladys release :pray:

1 Like

Available in Gladys Assistant 4.26, I’m closing this thread to free up votes:

3 Likes