Skip to content

Commit d00e979

Browse files
committed
Fix Windows build
1 parent 2ab402b commit d00e979

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Essentials/src/MediaPicker/ImageProcessor.windows.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,18 @@ static BitmapRotation GetImageOrientation(BitmapDecoder decoder)
133133
public static partial async Task<Stream> ApplyMetadataAsync(Stream processedStream, byte[] metadata, string? originalFileName)
134134
{
135135
if (processedStream == null || metadata == null || metadata.Length == 0)
136-
return processedStream ?? new MemoryStream();
136+
return await Task.FromResult(processedStream) ?? new MemoryStream();
137137

138138
try
139139
{
140140
// For now, Windows doesn't have a simple way to reapply metadata to processed images
141141
// The Windows Imaging Component (WIC) makes this complex, so we'll return the processed stream as-is
142142
// In the future, this could be enhanced with more sophisticated metadata handling
143-
return processedStream;
143+
return await Task.FromResult(processedStream);
144144
}
145145
catch
146146
{
147-
return processedStream;
147+
return await Task.FromResult(processedStream);
148148
}
149149
}
150150
}

0 commit comments

Comments
 (0)