Remove JPEG (#1065)

Co-authored-by: Lasercar <64717068+Lasercar@users.noreply.github.com>
This commit is contained in:
Eric
2025-05-30 19:46:34 -07:00
committed by GitHub
co-authored by Lasercar
parent c7abb19698
commit 93e4f799f4
4 changed files with 5 additions and 70 deletions
@@ -469,7 +469,7 @@ class ScreenshotPlugin extends FlxBasic
}
/**
* Convert a Bitmap to a PNG or JPEG ByteArray to save to a file.
* Convert a Bitmap to a PNG ByteArray to save to a file.
*/
function encode(bitmap:Bitmap):ByteArray
{
@@ -494,7 +494,7 @@ class ScreenshotPlugin extends FlxBasic
if (previousScreenshotName != targetPath && previousScreenshotName != (targetPath + ' (${previousScreenshotCopyNum})'))
{
previousScreenshotName = targetPath;
targetPath = getScreenshotPath() + targetPath + '.' + Std.string(Preferences.saveFormat).toLowerCase();
targetPath = getScreenshotPath() + targetPath + '.png';
previousScreenshotCopyNum = 2;
}
else
@@ -506,7 +506,7 @@ class ScreenshotPlugin extends FlxBasic
newTargetPath = targetPath + ' (${previousScreenshotCopyNum})';
}
previousScreenshotName = newTargetPath;
targetPath = getScreenshotPath() + newTargetPath + '.' + Std.string(Preferences.saveFormat).toLowerCase();
targetPath = getScreenshotPath() + newTargetPath + '.png';
}
// TODO: Make screenshot saving work on browser.
@@ -520,7 +520,7 @@ class ScreenshotPlugin extends FlxBasic
if (pngData == null)
{
trace('[WARN] Failed to encode ${Preferences.saveFormat} data');
trace('[WARN] Failed to encode PNG data');
previousScreenshotName = null;
// Just in case
unsavedScreenshotBuffer.shift();
@@ -544,7 +544,7 @@ class ScreenshotPlugin extends FlxBasic
if (pngData == null)
{
trace('[WARN] Failed to encode ${Preferences.saveFormat} data');
trace('[WARN] Failed to encode PNG data');
previousScreenshotName = null;
return;
}