Skip to content
fbuchinger edited this page Aug 26, 2012 · 5 revisions

Overview

This short document currently exists in lieu of a full-fledged javascript api documentation. It describes the core components and extension points of rawson.js. as rawson.js is in a very early stage of development, the api behaviour might change fast and without prior notice.

Core concepts

Viewer

the viewer is the "app" instance of rawson, much like OpenLayers.Map in OpenLayers. Currently, it is initialized with all controls and formats and their specific configuration. The viewer implementation can be found in the Rawson.Viewer module.

dcraw wrapper

the dcraw wrapper aka Rawson.File translates the command-line api of dcraw into easy-understandable methods and also does some data transformation.

Preview

the preview object represents a camera raw preview opened in the viewer, which can be either a jpeg or a uncompressed RGB bitmap image. preview instances get passed around quite often via event handlers, their base class is Rawson.Preview

Plugin Types

Controls

add new functionality to the user interface of rawson.js, e.g. drag'n'drop support for opening files, a menu system or a thumbnail pane for all currently opened files. They are conceptionally similar to OpenLayers Controls.

All controls are sub-classes of Rawson.Control

Formats

add reading and/or writing support for a certain image format to rawson.js. Currently the save as jpeg/png feature makes use of Rawson.Format instances. Note that the reading of a raw file does not yet happen within a format, this will be changed within the next releases.

Services

services allow the direct publishing of photos opened in rawson to various online services (think: twitter/facebook or simple, anonymous services as img.ur). There is an initial implementation of a service base class, but this code needs review and is not working yet.