How can I display image clearly in xterm











up vote
2
down vote

favorite












All of the open source software that I used,only w3m can display image clearly,I want to try to display image in xterm,how can I accomplish it? I tried 'tput' command to change the color of output characters to display a similar photo.










share|improve this question
























  • Raster graphics in xterm?
    – phuclv
    Jan 15 at 9:07















up vote
2
down vote

favorite












All of the open source software that I used,only w3m can display image clearly,I want to try to display image in xterm,how can I accomplish it? I tried 'tput' command to change the color of output characters to display a similar photo.










share|improve this question
























  • Raster graphics in xterm?
    – phuclv
    Jan 15 at 9:07













up vote
2
down vote

favorite









up vote
2
down vote

favorite











All of the open source software that I used,only w3m can display image clearly,I want to try to display image in xterm,how can I accomplish it? I tried 'tput' command to change the color of output characters to display a similar photo.










share|improve this question















All of the open source software that I used,only w3m can display image clearly,I want to try to display image in xterm,how can I accomplish it? I tried 'tput' command to change the color of output characters to display a similar photo.







terminal xterm images






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 21:19









Rui F Ribeiro

38.2k1475125




38.2k1475125










asked Feb 24 '16 at 15:35









Tracy McGrady

163




163












  • Raster graphics in xterm?
    – phuclv
    Jan 15 at 9:07


















  • Raster graphics in xterm?
    – phuclv
    Jan 15 at 9:07
















Raster graphics in xterm?
– phuclv
Jan 15 at 9:07




Raster graphics in xterm?
– phuclv
Jan 15 at 9:07










1 Answer
1






active

oldest

votes

















up vote
2
down vote













w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.



Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.



As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.



xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.






share|improve this answer





















  • See also terminology for a terminal emulator that can embed images.
    – Stéphane Chazelas
    Feb 25 '16 at 9:17










  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
    – Thomas Dickey
    Feb 25 '16 at 9:22












  • Really really thanks.I got it
    – Tracy McGrady
    Feb 25 '16 at 15:14













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f265518%2fhow-can-i-display-image-clearly-in-xterm%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.



Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.



As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.



xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.






share|improve this answer





















  • See also terminology for a terminal emulator that can embed images.
    – Stéphane Chazelas
    Feb 25 '16 at 9:17










  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
    – Thomas Dickey
    Feb 25 '16 at 9:22












  • Really really thanks.I got it
    – Tracy McGrady
    Feb 25 '16 at 15:14

















up vote
2
down vote













w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.



Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.



As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.



xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.






share|improve this answer





















  • See also terminology for a terminal emulator that can embed images.
    – Stéphane Chazelas
    Feb 25 '16 at 9:17










  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
    – Thomas Dickey
    Feb 25 '16 at 9:22












  • Really really thanks.I got it
    – Tracy McGrady
    Feb 25 '16 at 15:14















up vote
2
down vote










up vote
2
down vote









w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.



Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.



As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.



xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.






share|improve this answer












w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.



Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.



As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.



xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 24 '16 at 21:32









Thomas Dickey

51.5k594164




51.5k594164












  • See also terminology for a terminal emulator that can embed images.
    – Stéphane Chazelas
    Feb 25 '16 at 9:17










  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
    – Thomas Dickey
    Feb 25 '16 at 9:22












  • Really really thanks.I got it
    – Tracy McGrady
    Feb 25 '16 at 15:14




















  • See also terminology for a terminal emulator that can embed images.
    – Stéphane Chazelas
    Feb 25 '16 at 9:17










  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
    – Thomas Dickey
    Feb 25 '16 at 9:22












  • Really really thanks.I got it
    – Tracy McGrady
    Feb 25 '16 at 15:14


















See also terminology for a terminal emulator that can embed images.
– Stéphane Chazelas
Feb 25 '16 at 9:17




See also terminology for a terminal emulator that can embed images.
– Stéphane Chazelas
Feb 25 '16 at 9:17












I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
– Thomas Dickey
Feb 25 '16 at 9:22






I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term.
– Thomas Dickey
Feb 25 '16 at 9:22














Really really thanks.I got it
– Tracy McGrady
Feb 25 '16 at 15:14






Really really thanks.I got it
– Tracy McGrady
Feb 25 '16 at 15:14




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f265518%2fhow-can-i-display-image-clearly-in-xterm%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio