Skip to content

Commit

Permalink
Remove debugger call and use temp media path as gxfile destination
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sexenian committed Sep 14, 2023
1 parent e20eb9e commit cf6581d
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 @@ -6054,7 +6054,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 @@ -6077,8 +6076,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 cf6581d

Please sign in to comment.