MSYS2-packages
MSYS2-packages copied to clipboard
[Feature Request] libqrencode: enable PNG output support
Describe the bug
When using qrencode to write a png it says PNG output is disabled at compile time. No output generated.
It would be nice to be able to write PNG files instead of XPM, because PNG is a widely supported format while XPM is not.
Any updates on this?
Would you like to use a mingw version of the package? libpng is available in mingw packages.
Would you like to use a mingw version of the package? libpng is available in mingw packages.
The MinGW version currently has a bug where utf8 and ANSI types do not display correctly (https://github.com/fukuchi/libqrencode/issues/200), while the MSYS version does. So I would like to use the MSYS version for a while, at least until the bug is fixed.
That issue can be reproduced in cmd but not in mintty. Here is a screenshot in mintty.
That issue can be reproduced in cmd but not in mintty. Here is a screenshot in mintty.
Can confirm. Still an annoying bug, though. I use msys in Windows Terminal.
You can use something like ImageMagick or Inkscape as a workaround to convert a resulting SVG to a PNG. But I agree, it would be great to have it on MSYS.
I have used qrencode in bare metal Linux installation and it works perfect in both ansi256 and utf8 mode. The issue is in the Windows conhost. I slightly remember some similar issues with other programs in microsoft/terminal and mintty/mintty repositories. It goes something like conhost do its own text processing instead of handling over it to terminal emulators.
On the latest preview of Windows Terminal, both ANSI and UTF8 outputs work in the mingw package:
Many programs don't work in conhost, but they do in Windows Terminal. Conhost does not get all the fixes/patches that Windows Terminal gets because it's an internal component.
Many programs don't work in conhost
Some still work on conhost, though. I'm not sure whether the program should fixed to be compatible with conhost or the problem be fixed on conhost's side.
the problem be fixed on conhost's side.
I wouldn't bet on this. Microsoft itself heavily discourages use of conhost because of these bugs and the general lack of extensibility of conhost. They're all in on the new Terminal.
On the latest preview of Windows Terminal, both ANSI and UTF8 outputs work in the mingw package:
@rashil2000 Just tested in the latest Windows Terminal preview. It doesn't work for me though:
What's your $OutputEncoding
?
What's your
$OutputEncoding
?
Here:
Strange, what's your build number? Mine's 10.0.25158.1000
Strange, what's your build number? Mine's
10.0.25158.1000
Mine is 10.0.22000.795
. Are you on an insider build? Is it fixed in conhost or Windows Terminal Stable in there?
I'm on the Insider build.
Is it fixed in conhost or Windows Terminal Stable in there?
I have no idea 😅
I'm already in the beta insider, and it still doesn't work. Time to switch to the Dev Channel
@rashil2000 I'm in the same build as you now. Still doesn't work.
Maybe it has something to do with terminal's settings? My settings file is here.
Maybe it has something to do with terminal's settings? My settings file is here.
I used your config, and it still doesn't work for some reason. Can you trace what makes it work on your end (e.g., try default settings, Test Windows Terminal Stable or conhost)?
In conhost, UTF8 works but ANSI doesn't.
I've tested these shells with the given parameters to confirm that I don't have any interfering settings:
cmd /d
pwsh.exe -NoProfile
powershell.exe -NoProfile
One final thing: do you have this checkbox (at the bottom) checked?
One final thing: do you have this checkbox (at the bottom) checked?
Oh nice, enabling it fixed the problem. UTF8 works on conhost now but still not ANSI:
What does that feature exactly do anyway?
It enables support for new Unicode codepoints (UTF8 only).