GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimpchannel

## Name

gimpchannel --

## Synopsis

    gint32      gimp_channel_new                (gint32 image_ID,
                                                 gchar *name,
                                                 guint width,
                                                 guint height,
                                                 gdouble opacity,
                                                 GimpRGB *color);
    gint32      gimp_channel_copy               (gint32 channel_ID);
    gboolean    gimp_channel_delete             (gint32 channel_ID);
    gchar*      gimp_channel_get_name           (gint32 channel_ID);
    gboolean    gimp_channel_set_name           (gint32 channel_ID,
                                                 gchar *name);
    gboolean    gimp_channel_get_visible        (gint32 channel_ID);
    gboolean    gimp_channel_set_visible        (gint32 channel_ID,
                                                 gboolean visible);
    gboolean    gimp_channel_get_show_masked    (gint32 channel_ID);
    gboolean    gimp_channel_set_show_masked    (gint32 channel_ID,
                                                 gboolean show_masked);
    gdouble     gimp_channel_get_opacity        (gint32 channel_ID);
    gboolean    gimp_channel_set_opacity        (gint32 channel_ID,
                                                 gdouble opacity);
    gboolean    gimp_channel_get_color          (gint32 channel_ID,
                                                 GimpRGB *color);
    gboolean    gimp_channel_set_color          (gint32 channel_ID,
                                                 GimpRGB *color);
    gint        gimp_channel_get_tattoo         (gint32 channel_ID);
    gboolean    gimp_channel_set_tattoo         (gint32 channel_ID,
                                                 gint tattoo);
    #define     gimp_channel_get_image_id
    gboolean    gimp_channel_combine_masks      (gint32 channel1_ID,
                                                 gint32 channel2_ID,
                                                 GimpChannelOps operation,
                                                 gint offx,
                                                 gint offy);

## Description

## Details

### gimp_channel_new ()

    gint32      gimp_channel_new                (gint32 image_ID,
                                                 gchar *name,
                                                 guint width,
                                                 guint height,
                                                 gdouble opacity,
                                                 GimpRGB *color);

Create a new channel.

This procedure creates a new channel with the specified width and height. Name, opacity, and color are also supplied parameters. The new channel still needs to be added to the image, as this is not automatic. Add the new channel with the 'gimp_image_add_channel' command. Other attributes such as channel show masked, should be set with explicit procedure calls. The channel's contents are undefined initially.

`image_ID` : | The image to which to add the channel.
`name` : | The channel name.
`width` : | The channel width.
`height` : | The channel height.
`opacity` : | The channel opacity.
`color` : | The channel compositing color.
Returns : | The newly created channel.

### gimp_channel_copy ()

    gint32      gimp_channel_copy               (gint32 channel_ID);

Copy a channel.

This procedure copies the specified channel and returns the copy.

`channel_ID` : | The channel to copy.
Returns : | The newly copied channel.

### gimp_channel_delete ()

    gboolean    gimp_channel_delete             (gint32 channel_ID);

Delete a channel.

This procedure deletes the specified channel. This must not be done if the gimage containing this channel was already deleted or if the channel was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a channel which has not yet been added to an image.

`channel_ID` : | The channel to delete.
Returns : | TRUE on success.

### gimp_channel_get_name ()

    gchar*      gimp_channel_get_name           (gint32 channel_ID);

Get the name of the specified channel.

This procedure returns the specified channel's name.

`channel_ID` : | The channel.
Returns : | The channel name.

### gimp_channel_set_name ()

    gboolean    gimp_channel_set_name           (gint32 channel_ID,
                                                 gchar *name);

Set the name of the specified channel.

This procedure sets the specified channel's name.

`channel_ID` : | The channel.
`name` : | The new channel name.
Returns : | TRUE on success.

### gimp_channel_get_visible ()

    gboolean    gimp_channel_get_visible        (gint32 channel_ID);

Get the visibility of the specified channel.

This procedure returns the specified channel's visibility.

`channel_ID` : | The channel.
Returns : | The channel visibility.

### gimp_channel_set_visible ()

    gboolean    gimp_channel_set_visible        (gint32 channel_ID,
                                                 gboolean visible);

Set the visibility of the specified channel.

This procedure sets the specified channel's visibility.

`channel_ID` : | The channel.
`visible` : | The new channel visibility.
Returns : | TRUE on success.

### gimp_channel_get_show_masked ()

    gboolean    gimp_channel_get_show_masked    (gint32 channel_ID);

Get the composite method of the specified channel.

This procedure returns the specified channel's composite method. If it is non-zero, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.

`channel_ID` : | The channel.
Returns : | The channel composite method.

### gimp_channel_set_show_masked ()

    gboolean    gimp_channel_set_show_masked    (gint32 channel_ID,
                                                 gboolean show_masked);

Set the composite method of the specified channel.

This procedure sets the specified channel's composite method. If it is non-zero, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.

`channel_ID` : | The channel.
`show_masked` : | The new channel composite method.
Returns : | TRUE on success.

### gimp_channel_get_opacity ()

    gdouble     gimp_channel_get_opacity        (gint32 channel_ID);

Get the opacity of the specified channel.

This procedure returns the specified channel's opacity.

`channel_ID` : | The channel.
Returns : | The channel opacity.

### gimp_channel_set_opacity ()

    gboolean    gimp_channel_set_opacity        (gint32 channel_ID,
                                                 gdouble opacity);

Set the opacity of the specified channel.

This procedure sets the specified channel's opacity.

`channel_ID` : | The channel.
`opacity` : | The new channel opacity.
Returns : | TRUE on success.

### gimp_channel_get_color ()

    gboolean    gimp_channel_get_color          (gint32 channel_ID,
                                                 GimpRGB *color);

Get the compositing color of the specified channel.

This procedure returns the specified channel's compositing color.

`channel_ID` : | The channel.
`color` : | The channel compositing color.
Returns : | TRUE on success.

### gimp_channel_set_color ()

    gboolean    gimp_channel_set_color          (gint32 channel_ID,
                                                 GimpRGB *color);

Set the compositing color of the specified channel.

This procedure sets the specified channel's compositing color.

`channel_ID` : | The channel.
`color` : | The new channel compositing color.
Returns : | TRUE on success.

### gimp_channel_get_tattoo ()

    gint        gimp_channel_get_tattoo         (gint32 channel_ID);

Get the tattoo of the specified channel.

This procedure returns the specified channel's tattoo. A tattoo is a unique and permanent identifier attached to a channel that can be used to uniquely identify a channel within an image even between sessions.

`channel_ID` : | The channel.
Returns : | The channel tattoo.

### gimp_channel_set_tattoo ()

    gboolean    gimp_channel_set_tattoo         (gint32 channel_ID,
                                                 gint tattoo);

Set the tattoo of the specified channel.

This procedure sets the specified channel's tattoo. A tattoo is a unique and permanent identifier attached to a channel that can be used to uniquely identify a channel within an image even between sessions.

`channel_ID` : | The channel.
`tattoo` : | The new channel tattoo.
Returns : | TRUE on success.

### gimp_channel_get_image_id

    #define gimp_channel_get_image_id  gimp_drawable_image

### gimp_channel_combine_masks ()

    gboolean    gimp_channel_combine_masks      (gint32 channel1_ID,
                                                 gint32 channel2_ID,
                                                 GimpChannelOps operation,
                                                 gint offx,
                                                 gint offy);

Combine two channel masks.

This procedure combines two channel masks. The result is stored in the first channel.

`channel1_ID` : | The channel1.
`channel2_ID` : | The channel2.
`operation` : | The selection operation.
`offx` : | x offset between upper left corner of channels: (second - first).
`offy` : | y offset between upper left corner of channels: (second - first).
Returns : | TRUE on success.

<<< Previous Page | Home | Up | Next Page >>>
gimpbrushes | gimpcolor