Giter Club home page Giter Club logo

Comments (6)

ShirasawaSama avatar ShirasawaSama commented on July 18, 2024

是没有powershell么,系统是什么?

from cefdetectorx.

karakoo avatar karakoo commented on July 18, 2024

2022-11-29_16-17-17
同样不能显示图标
Windows 11 25247.1000

from cefdetectorx.

shoucandanghehe avatar shoucandanghehe commented on July 18, 2024

是没有powershell么,系统是什么?

Windows11 22H2 22622.601
PowerShell 7.2.7

from cefdetectorx.

Skimige avatar Skimige commented on July 18, 2024

image

Windows 10 22H2 19045.2251
PowerShell 5.1.19041.1682

个人测试原因:stdout 中含有在 PowerShell Profile 中自定义的 Write-Output

image

from cefdetectorx.

Skimige avatar Skimige commented on July 18, 2024

一种适用于我的情况(并且有点扭曲)的修复方法:

- const getExeIcon = file => execAsync('powershell -Command "Add-Type -AssemblyName System.Drawing;$S=New-Object System.IO.MemoryStream;' +
-   `[System.Drawing.Icon]::ExtractAssociatedIcon('${file}').ToBitmap().Save($S,[System.Drawing.Imaging.ImageFormat]::Png);$B=$S.ToArray();$S.Flush();$S.Dispose();[convert]::ToBase64String($B)"`)
-   .then(({ stdout }) => 'data:image/png;base64,' + stdout)
+ const getExeIcon = file => execAsync('powershell -Command "Write-Output ^^^;Add-Type -AssemblyName System.Drawing;$S=New-Object System.IO.MemoryStream;' +
+  `[System.Drawing.Icon]::ExtractAssociatedIcon('${file}').ToBitmap().Save($S,[System.Drawing.Imaging.ImageFormat]::Png);$B=$S.ToArray();$S.Flush();$S.Dispose();[convert]::ToBase64String($B);Write-Output ^^^"`)
+  .then(({ stdout }) => 'data:image/png;base64,' + stdout.split('^^^')[1])

from cefdetectorx.

ShirasawaSama avatar ShirasawaSama commented on July 18, 2024

Fixed in 0.0.2

from cefdetectorx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.