Can I make a button that rotates image when clicked?

Use case:
Viewing images in lister, and a see an image that I know I will want to rotate in DO's image viewer.
Can I make a button, that can automatically have the image viewer rotate the image so that when the viewer opens it is ready to view in the correct rotation?

There are rotation buttons on the Images toolbar that turns on by default when you're in thumbnails mode.

Those buttons seems to permanently rotate the image. That isn't what I meant.

I want to replicate the option that is in the right click menu of the viewer.
Clipboard Image

This tempory rotates for easy viewing with out altering the original image.
Is this possible?

Are you looking for one of these options?

Is there code to set the exif information? My use case includes all images collected from many sources. There is no guarantee there will be any exif information.

The SetAttr META command can change EXIF rotation tags, but that would still technically be changing the file contents (just not the image data), and it'll only work with image formats that support EXIF, which isn't all of them. (That said, we don't support rotating the image data of every format either; only BMP, JPG, GIF and PNG.)

With rotation of the actual image data, rotating JPEGs is usually done in a lossless way, and you can also specify that the rotation isn't done at all if it cannot be done lossless, if you're worried about that.

I guess image quality change was my biggest concern. It isn't that hard to manually rotate, I was just hoping there would be a simple command I could use to temporaryly rotate it for me. I will have to consider the lossless rotation