palette-unfold!

Synopsis

(palette-unfold! colormap)

Parameters

  • colormap: A colormap with dimensions 65536x1 or 256x256

Description

This procedure converts a palette colormap with dimensions 256x256 to its equivalent with dimensions 65536x1 not changing the total number of color pixels. If the palette colormap has already dimensions of 256x256 the colormap dimensions are not altered and the palette colormap is returned unchanged.

Side Effects

The dimensions are changed only if the input dimensions are 256x256.

Return Value

The palette colormap is returned.

Example

> (set! cm (colormap-scale-absolute cm 65536 1))
cm
> cm
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
> (palette-fold! cm)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:256 h:256>
> cm
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:256 h:256>
> (palette-unfold! cm)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
> cm
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
>