Remove JPEG (#1065)
Co-authored-by: Lasercar <64717068+Lasercar@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user