lvheaded(3)

LIBRARY ROUTINE
lvheaded - Edit the header fields of a VIFF image

LIBRARY CALL
#include "vinclude.h"
int
lvheaded(image,danger)
struct xvimage *image;
int danger;

INPUT

image
    Pointer to xvimage structure to be edited

danger
    integer, 0 means edit "safe" fields, 1 means edit all fields (dangerous ones too)

OUTPUT

image
    Pointer to xvimage structure that has been modified. This overwrites the original header data values.

MODIFICATIONS

DESCRIPTION
lvheaded is used to manually edit the FIELDS ONLY of the header of a VIFF image. There are two modes of operation: 1) Allow editing of non-dangerous fields and 2) allow editing of all fields. A dangerous field is one that if modified could destroy the ability to interpret the data in the image AT ALL, much less do it correctly.

WARNING: IT IS VERY EASY TO DESTROY AN IMAGE WITH THIS ROUTINE. It is not for use by folks who are not extremely familiar with the VIFF data structure and how it behaves and is interpreted by Khoros. DO NOT USE THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE DOING!

vheaded allows the header FIELDS to be changed. The image is written back out using the information in the modified header, but the DATA itself is not changed (unless the modified header causes it to be interpreted differently on writing). For example, you might change the data type of a BIT image to FLOAT, but the only thing that is changed is the header information - NOT THE DATA. If you do something like this you will get all kinds of errors and complaints from Khoros and you will be unable to recover the image data UNLESS you khow how the header was set up originally. You may also lose data from the data areas of the image, or obtain garbage as additional data.

As another example, you might change the color model field from ntscRGB to HSV, but the DATA IS NOT PROCESSED - only the header field value is changed.

SECOND WARNING: YOU CAN CREATE CORRUPT Khoros HEADERS WITH THIS ROUTINE. Do NOT use it except as a last resort to accomplish an otherwise unsupported operation (and possibly get back an unsupported bogus image).

SEE ALSO
vheaded(1), intro(3), vipl(3), verror(3), vutils(3) lvconvert(3)

RESTRICTIONS

AUTHOR
Scott Wilson

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.