I tried the one liner solution to capture screenshot via adb and the file is created successfully on PC but it is unreadable:
C:\Program Files\Android\android-sdk\platform-tools>adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > c:\users\utilisateur\desktop\android_screenshot1.png
The file seem to be correct but I think the Magic is not correct:
EDIT: The same issue happened with Git Bash for Windows.