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.

view-true

There are a few other files in this lab.

view.b
The modified wm/view to display JPEG and PNG in true color.
img.b
The img library extracted from charon
pics.b
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.
riolib.b
An alternative to wmlib.b for non-TK window applications
rioclient.b
Use with riolib.b for non-TK window applications
menuhit.b
Menus for non-TK windows
clock.b
A non-TK clock demonstration from Plan 9
picsar.b
Similar to pics.b but doesn't use the charon img library. Also doesn't do the remap to 24bit color.
matador.jpg
Test JPEG
test.png
Test PNG

FILES

lab 109

21 comments:

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 www.landclearingofwa.com/

SEO said...

This is definitely interesting. Thank you for sharing this.
seonotforhire.com/

click here said...

Thank you for sharing this with us!
https://www.concretecontractorsgreenville.com

Anonymous said...

Nice data. Thanks! | relax now

Danny said...

Looking forward for more post about this stuff. Thanks scott-keever-seo-washington-dc.business.site/

JohnRico said...

I like this post! It is very informative and useless in programming. Thank you for sharing! https://www.concretecontractorstuscaloosa.com

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 https://www.concretecontractorscharleston.com

Anonymous said...

That is so amazing!!
-Sanji Kun | www.unmannedsas.com/

Kerstin said...

Nice blog, very informative one. https://www.lafayettekitchenpros.com

Anonymous said...

Nice blog. I really like the information.
https://www.applyrite.com/

Carla said...

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

Anonymous said...

Love this, awesome stuff! https://www.handymanreginask.com

Faina said...

Such a great and informative article. www.inspectionmanaging.com/

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. https://www.weddingplannersraleigh.com