Bug reported by Tilman J . Rothe 6 years ago on the Debian BTS, still applies to latest xwd.
xwd -frame captures a window including the frame all around it. When -name foo is used, -frame seems to be ignored.
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.