files-community / Files

A modern file manager that helps users organize their files and folders.
https://files.community
MIT License
34.53k stars 2.2k forks source link

Feature: Add option to rotate more image formats #10494

Open carlosvsilva opened 1 year ago

carlosvsilva commented 1 year ago

What feature or improvement do you think would benefit Files?

Phones nowadays shoot mostly in .HEIF/.HEIC (Apple/Samsung) and RAWs like .DNG (altough .NEF and .CR2 plus Sony formats are also really widespread)

Files would be really extra useful if it allowed rotating photos with the wrong orientation out of the camera, for the file formats above beyond the currently supported JPG. I know exiftool handles all of them, with a simple exif metadata edit: exiftool -orientation#=1 -m -P -overwrite_original photo001.heic to set it as landscape

exiftool supports most image formats already.

Requirements

Files Version

Versão: 2.3.60.0 OS Version: 10.0.22621.819

Windows Version

Microsoft Windows 11 22H2 [Version 10.0.22621.819]

Comments

open-source exiftool usually does the trick.

yaira2 commented 1 year ago

@puppetsw fyi

puppetsw commented 1 year ago

@puppetsw fyi

After a bit of looking, HEIF, DNG, RAW etc formats aren't supported by .NET. I think if we want to have this function we would need to use an external library to handle this, as there is a fair amount of work to implement a decoder for these formats.

yaira2 commented 1 year ago

I don't think we should use a third party library for this. Probably best to leave this feature out for now.

hishitetsu commented 1 year ago

Although BitmapEncoder API seems to have no HEIF/HEIC support, File Explorer can rotate .heic images. I wonder if there is any public API for HEIF/HEIC. By the way, Files can't rotate gif and tiff images, but BitmapEncoder supports them. So we can add support for these formats right now.

https://learn.microsoft.com/en-us/uwp/api/windows.graphics.imaging.bitmapencoder?view=winrt-22621

yaira2 commented 1 year ago

@hishitetsu do you want to open a PR? I think it's just a matter of adding them to the list of supported file extensions.

hishitetsu commented 1 year ago

Either is fine. I think anyone can do it, so we may open another issue and make it a good first issue.

hishitetsu commented 1 year ago

I opened another issue. https://github.com/files-community/Files/issues/12133