# Shared resources. Specification

Current version : 0.1. See Revisions History below for list of changes between versions.

You can find the most recent version of the spec in the wiki of CREATE Project.

Warning: This specification is a work in progress. It's not recommended to follow it in its current state.

# Abstract

Today opensource graphics applications seem to like to work out uniform solutions. Krita uses GIMP's brushes, Inkscape uses GIMP's color swatches files. Still missing are ways to share resources like brushes, so that users wouldn't need to install all of these resources separately for each and every application that can read such data.

The intention of this specification is to work out uniform rules for storing possibly shared data, which would let

- developers benefit from no efforts duplication;
- packagers benefit from no efforts duplication;
- users benefit from using one root directory for all art supplies and one art supplies registry for all applications.

# Applications

Following applications (in strict alphabetical order) are taken into consideration while writing this specification (as of current version):

- CinePaint (0.19)
- GNU Image Manipulation Program (2.3.3+CVS)
- Inkscape (0.42+CVS)
- Karbon14 (1.4.1+SVN)
- Krita (1.4.1)
- mtPaint (2.19.10)
- OpenOffice.org
- Scribus (1.3.0+CVS)
- sK1 (rc0)
- Skencil (0.6.17)

# Types of resources and directories at present time

## Brushes

### Bitmap brushes

A brush file is usually a container format that can store different types of raster graphics (e.g. PNG).

Table 1. Bitmap brushes

CinePaint | Uses GIMP's '''.gbr''' and '''.gih''' brushes, but with higher color resolution | ~/.cinepaint/brushes and $INSTALL_PATH/share/cinepaint/brushes
Inkscape | Doesn't use bitmap brushes |
Karbon14 | Doesn't use bitmap brushes |
Krita | Uses GIMP's '''.gbr''' and '''.gih''' brushes | $INSTALL_PATH/share/apps/krita/brushes/
mtPaint | Doesn't use bitmap brushes |
Scribus | Doesn't use bitmap brushes and doesn't need them |
sK1 | Doesn't use bitmap brushes |
Skencil | Doesn't use bitmap brushes |

GIMP

Supported file formats are: '''.gbr''' (GIMP Brush 8bit grayscale or 24bit RGB, also CinePaint's 16bit .gbr), '''.abr''' (Photoshop Brush, 8bit grayscale), '''.gih''' (GIMP image hose, a format for animated brushes; PSP image tubes can be loaded using the PSP import plug-in, saving them again as .gih makes them available to GIMP), '''.vbr''' (GIMP parametric brush, a simple format for vector brushes).

~/.gimp-$VERSION/brushes and $INSTALL_PATH/share/gimp/$VERSION/brushes

### Vector brushes

Vector brushes are different from bitmap/raster brushes being freely scalable up and down without losing much quality. So far they are not implemented in any of opensource software, but should be kept in mind in the long run.

## XML brushes

XML brushes describe types of behaviour, like paint deposition, fringe spatter and so on.

## Gradients

Gradient files store description of gradients

Table 2. Gradients

CinePaint | Uses GIMP's '''.ggr''' gradients of higher than originally color resolution | ~/.cinepaint/gradients and $INSTALL_PATH/share/cinepaint/gradients
Inkscape | Stores gradients in documents |
Karbon14 | Uses its own '''.kgr''' files, openclipart svg gradient files ('''.svg'''), GIMP's '''.gpl''' files | $INSTALL_PATH/share/apps/karbon/gradients/ and ~/.kde/share/apps/karbon/gradients
Krita | Uses GIMP's '''.ggr''' gradients | $INSTALL_PATH/share/apps/krita/gradients/
mtPaint | Doesn't use gradients |
Scribus | Gradients come from vector code |
sK1 | Stores gradients in documents, uses .skg CMYK gradients files | ~/.sK1/gradients $sK1_HOME/RESOURCES/gradients
Skencil | Stores gradients in documents |
GIMP | Uses GIMP's '''.ggr''' files (GIMP Gradient, RGB colors stored as floats) and '''.svg''' files (as defined in the SVG spec) | ~/.gimp-$VERSION/gradients and $INSTALL_PATH/share/gimp/$VERSION/gradients
OpenOffice.org Draw | Uses Star Office Gradients ('''.sog''') which is written using draw XML (swatches, and hatches (patterns) are also specified) |
OpenOffice.org Impress | Uses Star Office Gradients ('''.sog''') which is written using draw XML (swatches, and hatches (patterns) are also specified) |

## Color swatches

There is some confusion in terms. Color swatches are same as palettes and color sets: these are files that store a set of predefined colors. Currently all of opensource applications support RGB based color swatches files only.

Table 3. Color swatches

CinePaint | Uses GIMP's '''.gpl''' palette files of higher than originally color resolution | ~/.cinepaint/palettes and $INSTALL_PATH/share/cinepaint/palettes
Inkscape | Uses GIMP's '''.gpl''' palette files | ~/.inkscape/palettes and $INSTALL_PATH/share/inkscape/palettes
Karbon14 | Doesn't support palette files yet. |
Krita | Uses GIMP's '''.gpl''' palette files | $INSTALL_PATH/share/apps/krita/palettes/
mtPaint | Uses GIMP's '''.gpl''' palette files | '''n/a'''

Scribus

Currently the same as X11/gimp ones, they are loaded from the installed files into the documents

Installed into $(libdir)/scribus/

     rgbscribusgnome.txt  Gnome set
     rgbscribusgreys.txt  X11 greys only
     rgbscribusopenoffice.txt  OpenOffice.org set
     rgbscribus.txt X11 full set
     rgbsvg.txt SVG set

sK1 | 4-bytes CMYK palettes ('''.skp''') | ~/.sK1/palettes, $sK1_HOME/RESOURCES/palettes
Skencil | RGB palettes with three floats (0.0 1.0) and an optional name per color ('''.spl'''). Can read gimp palette files as well. | $skencil_HOME/Resources/Misc
GIMP | Uses GIMP's '''.gpl''' palette files (8bit RGB), RIFF palette files (8bit RGB), Photoshop's '''.act''' binary color palettes (8bit RGB), JASC's Paint Shop Pro '''.psp''' color palettes (8bit RGB) | ~/.gimp-$VERSION/palettes and $INSTALL_PATH/share/gimp/$VERSION/palettes

## Patterns

### Bitmap patterns

Bitmap patterns are same as textures — files with an image inside (a container format as well) to fill a selected area multiply times creating a pattern.

Table 4. Bitmap brushes

CinePaint | Uses GIMP's pattern files ('''.pat''') of higher than originally color resolution | ~/.cinepaint/patterns and $INSTALL_PATH/share/cinepaint/patterns
Inkscape | Doesn't use bitmap patterns |
Karbon14 | Doesn't use bitmap patterns |
Krita | Uses GIMP's pattern files ('''.pat''') | $INSTALL_PATH/share/apps/krita/patterns
mtPaint | Doesn't use bitmap patterns |
Scribus | Doesn't use bitmap patterns |
sK1 | CMYK bitmap patterns ('''.tiff''', '''.jpg''') | ~/.sK1/patterns , $sK1_HOME/RESOURCES/patterns
Skencil | Any raster image the Python Imaging Library can read | $skencil_HOME/Resources/Misc
GIMP | Uses GIMP's '''.pat''' files (GIMP pattern, RGB or RGBA, 8bit per channel) and all image formats supported by gdk-pixbuf, most importantly PNG, JPEG and SVG (rendered at librsvg's default resolution) | ~/.gimp-$VERSION/patterns and $INSTALL_PATH/share/gimp/$VERSION/patterns

### Vector patterns

Vector patterns are same as bitmap ones being just vector based and thus scalable up/down without losing much quality. So far they are not implemented in any of opensource software, but should be kept in mind in the long run.

### Clipart

Under clipart we understand files that are all-sufficient and can be reused as part of some other artwork. It can be either bitmap or vector graphics.

Table 5. Clipart

CinePaint | Not implemented |
Inkscape | There is a separately shipped clip art navigator (currently v0.4) |
Karbon14 | There is an initial implementation of a clipart browser |
Krita | Not implemented |
mtPaint | Not implemented |
Scribus | Clipart browser is at design stage |
sK1 | B&W '''.sk1''' clipart | $sK1_HOME/RESOURCES/symbols and user defined symbols in ~/.sK1/symbols
Skencil | Not implemented |
GIMP | Not implemented |

# Proposed changes

Make all of the above applications use one root directory for all art supplies:

On UNIX (GNU/Linux, FreeBSD etc.) systems :

usr share/create/ and ~/.create/ (for local use)

Windows systems :

C:\%COMMONFILES%\create and C:\%APPDATA%\create (for local use)

On Mac OS X systems : suggestion: /Library/Application\ Support/create and ~/Library/Application\ Support/create (for local use)

The outline for subdirectories would look the following way then:

    /usr/share/create/
    		brushes
    			gimp
    			photoshop
    			pipe
    			vector
    			xml
    		clipart
    		gradients
    			gimp
    			karbon14
    			svg
    		patterns
    			bitmap
    			vector
    		swatches

# Needs further investigation

- directories of all of the above and below mentioned applications in Mac OS X;
- more information about Karbon14;
- information about Abiword (clipart);
- possibility of application icons reuse.
- usage of the XDG Base Directory Specification at Freedesktop.org. On Unix that would mean storing local files in $XDG_DATA_HOME/create rather than $HOME/.create

# References

1. A bug report covering paths to search for ICC by Scribus.
2. A letter from Alan Horkan to gimp-developer@ list, which initiated an offlist discussion among GIMP, Krita, Inkscape and Scribus developers.
3. An initial request by Alexandre Prokoudine for a new project covering shared graphics applications resources at Freedesktop.org.
4. A blog entry by Jon Philips', where in comments it was decided to merge efforts with CREATE project at Freedesktop.org
5. OpenIcc — a project with two main goals: 1) to work out a common set of settings for color savvy applications to share ICC/ICM profiles and settings; 2) to bring together those developers in areas like printing, display and desktop applications to work together to make color management end to end work for open source applications. OpenIcc and ICC in common aren't covered by 'Shared resources' spec beginning from v0.0.4.
6. OpenDocument specification

# Contributors

Tim Beaulen

Craig Bradney

Alan Horkan

Sven Neumann

Igor Novikov

Alexandre Prokoudine

Boudewijn Rempt

Robin Rowe

Mark Tyler

# License

License applied to this specification is Creative Commons No Derivative Works

# Revisions History

- Revision 0.1 (5 December 2005). Added more infor about Karbon14, Krita. Added mtPaint and its author, Mark Tyler. Added Sven's elaboration on file formats supported by GIMP. Changed "Authors" to "Contributors". Integrated suggestion of anonymous user about locale sensitive path variable on Windows. Added suggestion for OS X folders. Added link to OpenDocument spec. Added XDG Base Directory Specification to the list "Needs further investigation".

- Revision 0.0.5 (9 September 2005). Added sK1 to the list of considered applications. Added information about Sketch and sK1. Cleaned up "Needs further investigation" section. Added Robin Rowe to the list of contributors and moved to alphabetical order instead of order of appearance.

- Revision 0.0.4 (4 September 2005). Switched to DocBook/XML. ICC is moved away from the spec, because OpenIcc spec should be informative enough. Lots of typos are fixed. Changed structure of the document and added section "XML brushes". Added mentioning openclipart gradients to Karbon14 (Section "Gradients"). Reorganised subdirectories definition and changed it to an outline. Added info about Cinepaint. Changed mentioned version of Clipart browser which was written for Google's Summer Of Code contest.

- Revision 0.0.3 (16 August 2005). Added a References section and several references.

- Revision 0.0.2 (16 August 2005). Fixed description for Scribus in color swatches and ICC aspect.

- Revision 0.0.1 (16 August 2005). Initial version