formZ SDK | 5.0 API Reference | Project | File Formats | Structured File Translator | Image Bitmap

# fz_ffmt_image_bmap_scanline_init

Description

Initialize the image bitmap import storage.

Plugin Prototype

fzrt_error_td fz_ffmt_image_bmap_scanline_init(

fzrt_pbuf_ptr * | pbuf,
fzrt_int | img_width,
short | bits_per_pixel,
short | bytes_per_pixel,
short | channels,
fz_ffmt_image_channel_enum | which_channel,
fz_ffmt_image_order_enum | rgb_order,
fzrt_boolean | alpha_first,
fz_ffmt_image_type_enum | img_type,
unsigned char * | color_map,
short | map_entry_bits,
short | map_entry_bytes,
short | map_n_entries,
short | map_order,
fz_ffmt_image_map_type_enum | map_type,
double | gamma,
fz_ffmt_image_import_ptr * | img_in_ptr )

Parameters

pbuf [Input]

The pixel buffer where the image is going.

img_width [Input]

The number of pixels per scan line.

bits_per_pixel [Input]

The number of bits per pixel.

Range: 8, 16, 24 or 32

bytes_per_pixel [Input]

The number of bytes per pixel (real size of pixel), used for incrementing pixel pointer.

channels [Input]

The number of color channels.

Range: 1 = grayscale or ALPHA, 3 = RGB, 4 = RGBA

which_channel [Input]

The color channels in the image scanline

rgb_order [Input]

The order of the colors on a scan line.

alpha_first [Input]

If TRUE the alpha channel precedes the color channels.

Range: FALSE = RGBA or ABGR, TRUE = ARGB or BGRA

img_type [Input]

valid values are FZ_FFMT_IMAGE_TYPE_TRUE_COLOR, FZ_FFMT_IMAGE_TYPE_MAPPED_COLOR

color_map [Input]

The image colormap. If has_colormap is FALSE, this should be NULL.

map_entry_bits [Input]

The number of bits in each color map entry.

map_entry_bytes [Input]

The number of bytes in each color map entry.

map_n_entries [Input]

The number of entries in the color map.

map_order [Input]

the color organization in the color map.

Range: 1 = RGB-RGB-RGB, 0 = RRR-GGG-BBB

map_type [Input]

The type of color map needed for the image.

gamma [Input]

The gamma value of the image.

img_in_ptr [Result]

The image bitmap import storage.

Returns

FZRT_NOERR on success. An error otherwise.

Availability

5.0.0.0

Function Set

fz_ffmt_image_fset

Defined in

fz_ffmt_api.h