jp2a icon indicating copy to clipboard operation
jp2a copied to clipboard

problems in color output

Open alexxxmg opened this issue 9 years ago • 16 comments

I just compiled and installed jp2a 1.0.7 configure doesnt detect any strange things... the only "no" are these: checking for curl-config... no checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no The make process works flawlessly.

jp2a works OK in BW, but it doesnt do color! I tried jp2a --colors http://mewbies.com/geek_fun_files/blueeyedblackkitten.jpg and it produces this: tinyupload link.

BTW I'm using a semitransparent konsole, but the same happens under gnome-terminal, terminology, LilyTerm, xterm.

Moreover, going into jp2a/tests and simply doing cat grind-color.txt, I see perfectly the colors - but producing the same output by jp2a it doesnt work: tinyupload link.

A second issue - dont know if related to the first, I can open a second issue if you prefer - is that I tried to make it work at least for color HTML output, but doing a jp2a grind.jpg --html --color --width=60 I get exactly the same output as non-html, simply followed by

</pre>
</div>
</body>
</html>

... like it is missing a CSS header or something!

My system is a Fedora fc20, if you tell me what to test I'll do it gladly - I love ASCII art since forever and your program seems to be the best ...

thank you for your work,

Alessandro

alexxxmg avatar Sep 08 '16 10:09 alexxxmg

Have you tried running jp2a --colors on a local file? Since it didn't find curl-configure, it may be that it's just not downloading the file (and failing to give out an error message). You can try installing the curl development package (usually curl-devel) and rerun configure and recompile.

cslarsen avatar Sep 10 '16 06:09 cslarsen

yes - sorry, I chose the wrong example... the problem is there for any file, local or remote (BTW the remote files arrive perfectly, only they are rendered in BW as the others)

alexxxmg avatar Sep 13 '16 12:09 alexxxmg

Can you output the results to a file and send it? Also check your TERM settings.

cslarsen avatar Sep 15 '16 10:09 cslarsen

jp2a grind.jpg --color > grindoutput.txt

grindoutput.txt

TERM=xterm-256color

alexxxmg avatar Sep 16 '16 08:09 alexxxmg

Ok, bug noted. Haven't looked at the code for ages, so if I do come up with a new version, I'll have a look (I'd love to actual use 256 terminal colors).

cslarsen avatar Sep 21 '16 18:09 cslarsen

ahhhhh - so the problem is my setting of TERM? I dont know exactly what it does, so if I was to put it at a lower # of colors ???

alexxxmg avatar Sep 22 '16 07:09 alexxxmg

thanks to the hijacked conversation by eribertomota :-) I discovered there the source of the problem. Downloading by sourceforge the v1.0.6 version I can confirm that in fact the color output works perfectly!

alexxxmg avatar Nov 07 '16 10:11 alexxxmg

Ok, thanks for helping me out! I'll have to go through the sources carefully and see how I can resolve this. Most likely I'll nuke 1.0.7. I don't think it was ever officially released. Then I'll make 1.0.8 the same as 1.0.6 but hosted on github... :-)

cslarsen avatar Nov 07 '16 15:11 cslarsen

If you pull master now, this should be resolved. Can you verify?

cslarsen avatar Nov 11 '16 09:11 cslarsen

If you pull master now, this should be resolved. Can you verify?

Yes! 1.0.7 has no colors here (tumbleweed), but master has.

sebix avatar Dec 30 '16 20:12 sebix

Could we have 1.0.8 released then?

barracuda156 avatar Mar 15 '24 13:03 barracuda156

I maintain jp2a here and 1.0.8 is released. (1.0.9 adds truecolor support.) However some distros use older versions still. Which distro/OS are you using?

Talinx avatar Mar 15 '24 13:03 Talinx

@Talinx I have noticed the port is outdated in Macports, and portfile refers to this issue: https://github.com/macports/macports-ports/blob/36ac56e6aa4afeb15cc65b5333f02b3f7bbe22e3/graphics/jp2a/Portfile#L6-L9

Which is the advised version at the moment?

barracuda156 avatar Mar 15 '24 13:03 barracuda156

@barracuda156 This issue is not a problem with talinx/jp2a, I think the port should switch to that repo to use the latest version of jp2a.

Hopefully someone updates the port. I'll see what I can do, but I have no Mac and am not familiar with MacPorts. However it seems to be the case that it can be installed on other platforms also. I'll look into updating the port, but I don't have much time right now so it can take a while.

Maybe Homebrew, this docker image or building from source are options in the meantime?

If you want to update the port yourself I'm happy to help.

Talinx avatar Mar 15 '24 13:03 Talinx

@Talinx Thank you, let me try building it, if it works, I will update the port.

barracuda156 avatar Mar 15 '24 13:03 barracuda156

@Talinx There are two failures with tests, but overall looks good, I guess. https://github.com/Talinx/jp2a/issues/15

barracuda156 avatar Mar 15 '24 16:03 barracuda156