Repository navigation
feat: add nativeImage.createThumbnailFromPath API - #24802
Conversation
|
I think it fits with |
|
@georgexu99 has manually backported this PR to "10-x-y", please check out #25072 |
|
The @electron/wg-api approved this via Slack on Aug 20th, 2020 |
|
Release Notes Persisted
|
|
I tried to get app icon and got an error Does this API only get thumbnails of images? |
|
@gaodeng I'm also trying to get app icons in a cross-platform, high-res way. Could you share whether nativeImage.createThumbnailFromPath worked out for you, or what your best approach was? |
|
@MentalGear Facts have proved that high-definition icons can only be obtained through native mode, and electron does not support it. |
Description of Change
This api returns a preview thumbnail of a file given its file path. The thumbnail is the same as a file's preview picture in explorer/finder.
Checklist
npm testpassesRelease Notes
Notes: Added app.createThumbnailFromPath() API that returns a preview image of a file given its file path and a maximum thumbnail size.