Open Tom2112 opened 3 years ago
This was deliberate - it makes it clear the HEIC file is not the original and indicates what the source file name was.
Oh, OK. That's not how I'd think of it, but I get it. Thank you for writing this script, by the way!
One question: is there a way to control the amount of compression the conversion gives the image? I'm not noticing much difference in file size between the original jpg and the heic image.
The JPEG encoder supports this, but I do not know if the HEIC one does. If so, it should be possible to pass that parameter in similarly. You can find examples doing this with JPEG on the web.
FYI @Tom2112 The WIC-based ImageConverter from JohnnyWestlake does support the quality parameter for HEIC, copies metadata and offers a WRC as you probably wouldn't want to use the UWP-GUI.
You can now choose image quality whilst encoding to HEIC/HEIF! https://github.com/JohnnyWestlake/ImageConverter
I noticed that when piping the results of a directory command to your script, that the resulting new filenames include the old file extension, such as
myfile.jpg.heic
rather thanmyfile.heic
.This can be corrected by changing line 81 of your script from:
$outputFileName = $inputFile.Name + ".heic";
to:$outputFileName = $inputFile.DisplayName + ".heic";
With the change it will always drop the old file extension from the new file's name.Thanks, Tom