Skip to content

Commit

Permalink
Cherry pick branch 'genexuslabs:ImageAPITempMedia' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sexenian authored and genexusbot committed Sep 14, 2023
1 parent 13d6e35 commit d9afdb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6196,7 +6196,6 @@ public static string FlipVertically(string imageFile)

public static string Save(Image bitmap, string imageFile, ImageFormat format)
{
System.Diagnostics.Debugger.Launch();
string destinationImagePath = string.Empty;
using (MemoryStream ms = new MemoryStream())
{
Expand All @@ -6219,8 +6218,9 @@ public static string Save(Image bitmap, string imageFile, ImageFormat format)
imageFile = Path.GetFileName(uri.AbsolutePath);
}
GxFile sourceImage = new GxFile(GxContext.StaticPhysicalPath(), imageFile);
string destinationImageName = FileUtil.getTempFileName(Preferences.getTMP_MEDIA_PATH(), Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension());
GxFile destinationImage = new GxFile(GxContext.StaticPhysicalPath(), destinationImageName);
string tempDirectory = Preferences.getTMP_MEDIA_PATH();
string destinationImageName = FileUtil.getTempFileName(tempDirectory, Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension());
GxFile destinationImage = new GxFile(tempDirectory, destinationImageName);
destinationImage.Create(ms);
destinationImage.Close();
destinationImagePath = destinationImage.GetAbsoluteName();
Expand Down

0 comments on commit d9afdb9

Please sign in to comment.