Skip to content

Commit

Permalink
Support saving screenshots as WebP files
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue committed Dec 2, 2024
1 parent 0a67938 commit 2ab5116
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ export default defineComponent({

const format = screenshotFormat.value
const mimeType = `image/${format === 'jpg' ? 'jpeg' : format}`
const imageQuality = format === 'jpg' ? screenshotQuality.value / 100 : 1
const imageQuality = format !== 'png' ? screenshotQuality.value / 100 : 1

let filename
try {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/components/player-settings/player-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ export default defineComponent({
],
screenshotFormatNames: [
'PNG',
'JPEG'
'JPEG',
'WebP'
],
screenshotFormatValues: [
'png',
'jpg'
'jpg',
'webp'
],
screenshotFolderPlaceholder: '',
screenshotFilenameExample: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
:max-value="100"
:step="1"
value-extension="%"
:disabled="screenshotFormat !== 'jpg'"
:disabled="screenshotFormat === 'png'"
@change="updateScreenshotQuality"
/>
</ft-flex-box>
Expand Down

0 comments on commit 2ab5116

Please sign in to comment.