Sunday, December 23, 2012

lab 109 - wm/view true color

There has been a three and a half year gap in my posts to this blog. In that time I hadn't done any Limbo programming. I've used Acme as my editor everyday, but I was drifting towards using Notepad++ more often. In the past couple of months I've had the time to contemplate doing some hacking projects. I wanted to explore what I could do with Inferno for multimedia file types. This lab was the first thing I tackled in using Inferno again. I had to open up the Limbo paper to remember even some basic syntax.

It bothered me that wm/view only displayed images using the Inferno 256 color map. Charon didn't have this limitation and I thought it had something to do with their respective image libraries. They don't use the same code. I extracted Charon's img.b code out into another view tool only to realize once I'd finished that the difference was not in the handling of JPEGs or PNGs but in the remap of the raw image to an Inferno image after the image was loaded.

I changed wm/view to remap the graphic to 24bit color. Here are the results.


There are a few other files in this lab.

The modified wm/view to display JPEG and PNG in true color.
The img library extracted from charon
A view tool similar to the Plan 9 view command. It uses the charon img.b library. It also used the rioclient, riolib, and menuhit files included in this lab to give the appearance of a Rio window. You can see it in the upper left of the screenshot. Using this you can zoom in, pan, and fit to window. The zoom now works much better with true color than with the colormap.
An alternative to wmlib.b for non-TK window applications
Use with riolib.b for non-TK window applications
Menus for non-TK windows
A non-TK clock demonstration from Plan 9
Similar to pics.b but doesn't use the charon img library. Also doesn't do the remap to 24bit color.
Test PNG


lab 109


Tony said...

I am trying to run the "pics" command but nothing happens. What would be a proper command line example to use to run this command?

Unknown said...

"pics test.png" should work, as long as all the other files are compiled, riolib.b, menuhit.b, rioclient.b. It takes a little while for the graphic to open.

Lorriel Sims said...

Each color represents a different primary personality type, and all four lay the foundation of True Colors' fun and insightful

SEO said...

This is definitely interesting. Thank you for sharing this.

click here said...

Thank you for sharing this with us!

Anonymous said...

Nice data. Thanks! | relax now

Danny said...

Looking forward for more post about this stuff. Thanks

JohnRico said...

I like this post! It is very informative and useless in programming. Thank you for sharing!

Christian said...

This is really great! I like it a lot and it's really awesome! click here

Lionrange08 said...

This is great
tree trimming
stucco contractor
local skip hire
ealing painters
croydon tree services
glazier croydon
croydon painters

jamnes said...

Thanks for sharing this! Great article and very useful.
Office Cleaning Companies Denver

Anonymous said...

Very helpful article. Thank you for sharing. heater

pelletized product said...

This is nice. Thanks

Anonymous said...

That is so amazing!!
-Sanji Kun |

Kerstin said...

Nice blog, very informative one.

Anonymous said...

Nice blog. I really like the information.

Carla said...

Great to read quality info like this, thank you! boudoir photos

Anonymous said...

Love this, awesome stuff!

Faina said...

Such a great and informative article.

click said...

Why do they need to name it as "inferno"? Is there any logic to it?

Janwil said...

Thanks for this post, nice one.