You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sorting images by date, important when mixing images from different sources, the converted files have the date of the conversion and not the date of the original file. Please change the Date Created and Date Modified to match the original file.
Proposed Modification:
Process
{
# store input file's dates and set them on the detination file $fileCreateDate = $null;
$fileModifiedDate = $null;
$outFileName = ""
# Summary of imaging APIs: https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/imaging
foreach ($file in $Files)
{
**$outFileName = ""**
# Get SoftwareBitmap from input file
$file = Resolve-Path -LiteralPath $file
**$fileCreateDate = (Get-Item $file).CreationTime # Malcolm Stewart
$fileModifiedDate = (Get-Item $file).LastWriteTime # Malcolm Stewart**
**# $outputFileName = $inputFile.Name + ".jpg";
$outputFileName = $inputFile.Name -replace $inputFile.FileType, ".jpg"; # Malcolm Stewart ... new file is mypic.jpg instead of mypic.heic.jpg
$outFileName = "$($inputFolder.Path)\$outputFileName"**
finally
{
# Clean-up
if ($inputStream -ne $null) { [System.IDisposable]$inputStream.Dispose() }
if ($outputStream -ne $null) { [System.IDisposable]$outputStream.Dispose() }
**if ($outFileName -ne "")
{
(Get-Item $outFileName).CreationTime = $fileCreateDate # Malcolm Stewart
(Get-Item $outFileName).LastWriteTime = $fileModifiedDate # Malcolm Stewart
}**
The text was updated successfully, but these errors were encountered:
When sorting images by date, important when mixing images from different sources, the converted files have the date of the conversion and not the date of the original file. Please change the Date Created and Date Modified to match the original file.
Proposed Modification:
Process
{
# store input file's dates and set them on the detination file
$fileCreateDate = $null;
$fileModifiedDate = $null;
$outFileName = ""
The text was updated successfully, but these errors were encountered: