Adding PNG support to Osiva

People have been asking for PNG support for years.

We need a simple/small/fast  PNG decoder for Osiva. The standard libraries are not useful because they are too big;  Osiva has to stay pretty small. We will use http://lodev.org/lodepng/.

I have extended the examples in lodepng to paint the decoded image to a Windows window (instead of the built in SDL window). This example uses the unusably inefficient SetPixel() call, but it is just for  a sanity check. The code is at http://www.tristable.net/code/lodepng/.

Comments

Osiva source code is finally available

The source code to Osiva is now available under the GPL. It is at http://tristable.net/osiva/. Follow the Download Files link.

Sorry it took so long. I had to clean up the code a little bit.

Comments

Reality and “cthruview”

The reality is that I code all day anyway so it is really hard to find time to work on Osiva. I spend any extra time these days worrying about porting a real time VxWorks system into Linux. Boot time, scheduler tweaks, kernel modules, shared memory, power loss… All the things you don’t have to worry about under VxWorks. But then everything in VxWorks is kernel code, which does not work so well as the system grows.

Luckily other people like writing imaging applications also. One of the pending features for Osiva was to provide tracing support. A few people have asked for it, but the idea was filled out by Remik Ziemlinski.  The idea is to use native alpha transparency on the image window and then allow events to pass through the window, so you can lay the image over an image editor and trace away.

Remik did not feel like waiting for me to add the feature to Osiva so he wrote it himself in Java:

http://cthruview.sourceforge.net/

Comments (1)

Osiva Specification

OSIVA is an acronym meaning “overly simple image viewing application.” The name is not a joke, it is an assessment. The word  “simple” is used with the third meaning:

bare(a): apart from anything else; without additions or modifications; “only the bare facts”; …

Specification 1: Simple, meaning no GUI

Images are to be displayed simply as images, with no additional GUI elements. The word “overly” is the admission that such a presentation is probably not rich enough to allow the user to do all the things they want to do. Osiva is  a challenge to do something that probably cannot not be done very well.

Hence the Osiva “iconbar” and the right click menu. Both are capitulation to function creep that violate the prime specification. When Osiva was first built there was no icon bar. All the functions were performed using the keyboard only. The iconbar was a sales tool to let users know some of the things that they could do.

Specification 2: Simple, meaning images are shown in the shell

To extend the simplicity.  osiva will operate in the context of the shell. Images are manipulated directly within the shell, with no additional backgrounds or borders. Masks are applied against the shell. Transparency is open to the shell. Osiva should be a simple tool that can be very useful, because it does basic image compositing operations against whatever is beneath it.

Specification 3: Do everything with images except edit them

The operations you can do with osiva are intended to be simple: zoom, pan (actually just move), rotate, skew, mask transparency, alpha transparency — that’s it. Pretty much everything you can do with an image without actually editing it. Osiva is not an image editor, but it should be good at manipulating images.

Specification 4: Handle large data sets elegantly

Finally, osiva must work with large groups of images. This is where osiva fails badly under the current implementation. Osiva works great for a stack of small images, but for an SD card from a camera it fails miserably. All images dropped into osiva are read into RAM, at full resolution, which of course cripples the host completely.


Someday osiva will be a compositional tool. Osiva is ultimately  intended to be an animation creator, animating and rendering a list of images into a video format, according to the “slide show” settings. But for now osiva will remain a simple image viewer.

In the short term osiva needs to support more image formats, but mere support is not enough. The GIF and JPEG decoders used in osiva are relatively fast. One possibility for providing format support is to expose a plug in model and use the same PNG, BMP, etc decoders that every other application uses, but then osiva would take as much time to open those images as every other application does.

Comments (2)

Osiva Morphology

Osiva is a windows program intended to show images as virtual pictures scattered across the screen. Osiva was begun in the late 1990′s and predates other virtual picture manipulation programs by several years.

The initial goal of Osiva was to sketch out the user interface behavior, so the program is rotten at the core. It is useless for more than a couple of full resolution images. It has an ancient approach to transparency — designed for Windows 3.  It has an idiotic approach to scaling, intended primarily to support the ancient approach to transparency.

So now it is time to fully redevelop Osiva, this time out in the open as an Open Source application, with complete Lab Notes describing all of the issues and decisions.

Comments