home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-12 | 35.9 KB | 1,195 lines |
- TABLE OF CONTENTS
-
- proof.library/--background--
- proof.library/--history--
- proof.library/AllocProofA
- proof.library/AllocProofOwnerA
- proof.library/AllocProofOwnerEntry
- proof.library/ConvertFromProofA
- proof.library/ConvertToProofA
- proof.library/FreeProof
- proof.library/FreeProofOwner
- proof.library/GetProofAttrsA
- proof.library/GetProofOwnerAttrsA
- proof.library/GetProofOwnerEntry
- proof.library/IsProofA
- proof.library/IsProofFromLockA
- proof.library/LoadProofA
- proof.library/LoadProofFromBPTRA
- proof.library/LoadProofFromLockA
- proof.library/LoadProofOwnerA
- proof.library/SaveProofA
- proof.library/SaveProofOwnerA
- proof.library/SetProofAttrsA
- proof.library/SetProofOwnerAttrsA
- proof.library/SetProofOwnerEntry
- proof.library/ValidProofDesc
- proof.library/--background-- proof.library/--background--
-
- PURPOSE
- To create small 'proof' sized images of pictures for display with the
- option of storing them to disk in a compact, fast format, suitable for
- viewing on any target display system.
-
- COPYRIGHT
- The copyright in this library is owned by Paul Huxham.
-
- PhotoAlbum is Copyright 1996-1998 by Helmut Hoffmann
-
- DISCLAIMER
- proof.library and its associated files are supposed to be a proof
- creation/maintenance system. Even though every effort has been made to
- make proof.library as stable and functional as possible, I cannot rule
- out the possibility that proof.library may have bugs that have side
- effects (possibly harmful) on your system.
-
- I hereby reject any liability or responsibility for these or any other
- consequences from the use of proof.library whatsoever. This includes, but
- is not limited to, damage to your equipment, to your data, personal
- injuries, financial loss or any other kinds of side effects.
-
- proof.library is provided as-is. This means I do not guarantee that
- proof.library is fit for any specific purpose and I do not guarantee any
- bug fixes, updates or help during error recovery.
-
- DISTRIBUTION
- proof.library should be distributed at no charge to the end user. It may
- be included on Aminet CDs.
-
- The author retains all rights to the enclosed software. Payment is not
- required for the use of proof.library.
-
- For ANY COMMERCIAL APPLICATION using proof.library, contact the author
- for further information concerning distribution.
-
- REQUIREMENTS
- A minimum of Kickstart 2.0, 68020 CPU is required to use proof.library.
- jpeg.library (by the same author) is required IF you intend to use the
- default proof body format. (You most probably will!)
-
- COMPLIER
- proof.library was written and compiled using CED V3.5 and SAS/C 6.55 on
- an Amiga 4000/060. CyberGuard was used to detect/correct programming
- errors.
-
- BUGS
- Should you find any bugs, please report them so that they can be fixed.
- Likewise any suggestions for improvment of the library should be
- forwarded so that they can be addressed.
-
- THANKYOUS
- Many thanks to
- Dinh Thi Kim Tuyen
- -whom I cannot thank enough for showing me what I can be when I let
- go of the darkness. I love you.
-
- Steve Quartly
- - For pushing me into corners I wouldn't normally go, to teach me to
- see things where I would normally give up.
-
- AUTHOR
- You can contact the author via:
- email: paulh@mafeking.scouts.org.au
- or
- P.O. Box 875
- Morley,
- Perth,
- Western Australia 6943
-
- proof.library/--history-- proof.library/--history--
-
- V2.1
- > Fixed a bug where a non-linked loaded proof didn't contain an
- ImagePath. Proofs created in memory did.
-
- V2.0
- > Fixed an oversight where the proofs minimum size was 10 x 10. Now the
- minimum size is 1 x 1.
-
- > Now you can pass a pointer to a NULL string in PFN_ProofPath and the
- generated proof will be nonlinked. This is the same as not passing in
- this tag at all. ("PFN_ProofPath, NULL" is the same as not passing in
- this tag.)
-
- > Added a new tag PFN_ProofLinked. If you use GetProofAttrs() with this
- tag, you can tell if the proof is linked or nonlinked.
-
- V1.3
- > Fixed a bug where if ConvertToProof() was called more than once on
- the same proof pointer, memory was lost.
-
- V1.2
- > Fixed a bug where if the original proof is a photoalbum thumbnail,
- getting the PFN_TextImageDesc returned an invalid pointer.
-
- V1.1
- > Fixed a bug where if the original format was greyscale, getting the
- image description returned a stray pointer to memory.
-
- > Added an environment variable to allow switching off the check by
- protection bits. This fixes problems with filesystems that dont store
- or return protection bits correctly, eg CDs. in ENV:proof.library, make
- a variable called 'Test_Proof_By_Protection" and set it it 'yes' or
- 'no'. Use a value of no to skip testing the protection bits.
-
- > Fixed an enforcer hit, if the filetype stored by the calling
- application was above the specified range. (Was supposed to allow for
- custom image format descriptions.)
-
- V1.0
- > Initial release.
-
- proof.library/AllocProofA proof.library/AllocProofA
-
- NAME
- AllocProofA -- Allocate memory space for a proof structure
- AllocProof -- Varargs stub for AllocProofA
-
- SYNOPSIS
- err = AllocProofA( pf, taglist )
- a0 a1
-
- ULONG AllocProofA( struct Proof **pf, struct TagItem *taglist )
-
- err = AllocProof( pf, tag1, ... )
-
- ULONG AllocProof( struct Proof **pf, ULONG tag1, ... )
-
- FUNCTION
- Allocates the necessary memory space for a proof structure. Should be
- matched with a call to FreeProof().
-
- INPUTS
- pf - pointer to a struct Proof pointer.
- taglist - pointer to an optional tag list specifying how to initialize
- the data structure returned by this function. (For a complete
- list of available tags, see the SetProofAttrsA() function).
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- FreeProof(), SetProofAttrsA()
-
- proof.library/AllocProofOwnerA proof.library/AllocProofOwnerA
-
- NAME
- AllocProofOwnerA -- Allocate memory space for a proof owner structure
- AllocProofOwner -- Varargs stub for AllocProofOwnerA
-
- SYNOPSIS
- err = AllocProofOwnerA( po, taglist )
- a0 a1
-
- ULONG AllocProofOwnerA( struct ProofOwner **po, struct TagItem *taglist )
-
- err = AllocProofOwner( po, tag1, ... )
-
- ULONG AllocProofOwner( struct ProofOwner **po, ULONG tag1, ... )
-
- FUNCTION
- Allocates the necessary memory space for a proof owner structure. Should
- be matched with a call to FreeProofOwner().
-
- INPUTS
- po - pointer to a struct ProofOwner pointer.
- taglist - pointer to an optional tag list.
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- FreeProofOwner()
-
- proof.library/AllocProofOwnerEntry proof.library/AllocProofOwnerEntry
-
- NAME
- AllocProofOwnerEntry -- Allocate a new bit for an owner entry
-
- SYNOPSIS
- result = AllocProofOwnerEntry( po, group, name, bitnum )
- a0 d0 a1 a2
-
- ULONG AllocProofOwnerEntry( struct ProofOwner *po, BYTE group,
- char *name, LONG *bitnum )
-
- FUNCTION
- Allocates a new bit for an owner entry.
-
- INPUTS
- po - Pointer to a struct ProofOwner.
- group - A group number from 0 to 3.
- name - The name to set the entry to.
- bitnum - A pointer to a LONG to store the bit number allocated for you.
-
- RESULT
- err - returns PFERR_NONE if successful (bitnum is undefined), otherwise
- an error code. See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- GetProofOwnerEntry()
-
- proof.library/ConvertFromProofA proof.library/ConvertFromProofA
-
- NAME
- ConvertFromProofA -- Convert proof data to a target format
- ConvertFromProof -- Varargs stubs for ConvertFromProofA
-
- SYNOPSIS
- err = ConvertFromProofA( pf, taglist )
- a0 a1
-
- ULONG ConvertFromProofA( struct Proof *pf, struct TagItem *taglist )
-
- err = ConvertFromProof( pf, tag1, ... )
-
- ULONG ConvertFromProofA( struct Proof *pf, ULONG tag1, ... )
-
- FUNCTION
- Convert proof image data to a destination format. Currently only RGB
- triplet destination buffers are supported.
-
- INPUTS
- pf - pointer to a struct Proof.
- taglist - pointer to an optional tag list specifying how to convert the
- proof data.
-
- PFN_RGBTripletBuffer - Specifies a pointer to store the RGB
- triplets into.
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- proof.library/ConvertToProofA proof.library/ConvertToProofA
-
- NAME
- ConvertToProofA -- Convert an image to thumbnail data
- ConvertToProof -- Varargs stubs for ConvertToProofA
-
- SYNOPSIS
- err = ConvertToProofA( pf, taglist )
- a0 a1
-
- ULONG ConvertToProofA( struct Proof *pf, struct TagItem *taglist )
-
- err = ConvertToProof( pf, tag1, ... )
-
- ULONG ConvertToProofA( struct Proof *pf, ULONG tag1, ... )
-
- FUNCTION
- Convert an buffer to a proof image. Currently only RGB triplet buffers
- are supported.
-
- INPUTS
- pf - pointer to a struct Proof.
- taglist - pointer to an optional tag list specifying how to convert the
- image data. You may also pass in any header tags as described
- in GetProofAttrs().
-
- PFN_RGBTripletBuffer - Specifies a pointer to the first red component
- of the RGB triplets, stored contiguously in memory. (The width
- and height of the buffer data must be passed either with this
- function, or in AllocProofA().
-
- PFN_JFIFQuality - A jpeg save quality value (0-100) to use with
- jpeg.library if saving the proof in jpeg format (default 85).
-
- PFN_MemoryPool - A memory pool pointer to allocate memory for the
- proof image.
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- proof.library/FreeProof proof.library/FreeProof
-
- NAME
- FreeProof -- Free the memory space allocated for a proof
-
- SYNOPSIS
- FreeProof( pf, taglist )
- a0 a1
-
- void FreeProof( struct Proof **pf, struct TagItem *taglist )
-
- FUNCTION
- Frees all memory space associated with a proof structure. It is safe to
- call this function with a NULL proof pointer.
-
- INPUTS
- pf - pointer to a struct Proof pointer.
- taglist - pointer to an optional tag list.
-
- RESULT
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- AllocProofA()
-
- proof.library/FreeProofOwner proof.library/FreeProofOwner
-
- NAME
- FreeProofOwner -- Free the memory space allocated for a proof owner
-
- SYNOPSIS
- FreeProofOwner( po, taglist )
- a0 a1
-
- void FreeProofOwner( struct ProofOwner **po, struct TagItem *taglist )
-
- FUNCTION
- Frees all memory space associated with a proof owner structure. If the
- proof owner structure has not been saved, it will be lost. It is safe to
- call this function with a NULL proofowner pointer.
-
- INPUTS
- po - pointer to a struct ProofOwner pointer.
- taglist - pointer to an optional tag list.
-
- RESULT
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- AllocProofOwnerA()
-
- proof.library/GetProofAttrsA proof.library/GetProofAttrsA
-
- NAME
- GetProofAttrsA -- Get attributes of a proof
- GetProofAttrs -- Varargs stub for GetProofAttrsA
-
- SYNOPSIS
- result = GetProofAttrsA( pf, taglist )
- a0 a1
-
- ULONG GetProofAttrsA( struct Proof *pf, struct TagItem *taglist )
-
- result = GetProofAttrs( pf, tag1, ... )
-
- BOOL GetProofAttrs( struct Proof *pf, ULONG tag1, ... )
-
- FUNCTION
- Returns specified information from the proof into the taglist (ti_Data)
- pointers.
-
- INPUTS
- pf - pointer to a struct Proof.
- taglist - pointer to a tag list, containing the information to retrieve.
-
- Proof header tags
- PFN_ProofPathName - Return the path/filename of this proof's file. (char *
- *)
-
- PFN_CustomBuffer - Return a pointer to the custom buffer. (UBYTE **)
-
- PFN_CustomBufferSize - Return the size of the custom buffer. (ULONG *)
-
- PFN_Comment - Return the comment associated with the proof. (char **)
-
- PFN_ProofVersion - Return the version number of the proof. (UBYTE *)
-
- PFN_ProofWidth - Return the width of the proof. (UBYTE *)
-
- PFN_ProofHeight - Return the height of the proof. (UBYTE *)
-
- PFN_ProofQuestionable - Return the questionability of the proof. (BOOL *)
-
- PFN_ProofAspectX - Return the x aspect of the proof. (WORD *)
-
- PFN_ProofAspectY - Return the y aspect of the proof. (WORD *)
-
- PFN_ProofSaveable - Return the savabilty of the proof. (BOOL *)
-
- Proof description tags
- PFN_ImageName - Return the filename of the original image file
- associated with this proof. (char **)
-
- PFN_ImagePath - Return the path of the original image file associated
- with this proof. (char **)
-
- PFN_ImageWidth - Return the width of the image. (ULONG *)
-
- PFN_ImageHeight - Return the height of the image. (ULONG *)
-
- PFN_ImageFileSize - Return the file size of the image. (ULONG *)
-
- PFN_ImageType - Return the type of the image as PDIV_*. (UBYTE *)
-
- PFN_ImageDepth - Return the depth of the image. (UBYTE *)
-
- PFN_ImageFormat - Return the format of the image as PDFB_*. (UBYTE *)
-
- PFN_CategoryOwner - Return the image's category owner. (UBYTE *)
-
- PFN_ImageGroup - Return the group of the image. (UBYTE *)
-
- PFN_ImageCategory - Return the category of the image. (ULONG *)
-
- PFN_TextImageType - Return a pointer to a text descriptor of the
- original image. (char **)
-
- PFN_TextImageDesc - Copies into the supplied pointer a text descriptor
- of the image format. (char *)
-
- Miscellaneous tags
- PFN_UserData - Return the user data field. (ULONG *)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- proof.library/GetProofOwnerAttrsA proof.library/GetProofOwnerAttrsA
-
- NAME
- GetProofOwnerAttrsA -- Get attributes of a proof owner structure
- GetProofOwnerAttrs -- Varargs stub for GetProofAttrsOwnerA
-
- SYNOPSIS
- result = GetProofOwnerAttrsA( po, taglist )
- a0 a1
-
- ULONG GetProofOwnerAttrsA( struct ProofOwner *po,
- struct TagItem *taglist )
-
- result = GetProofOwnerAttrs( po, tag1, ... )
-
- ULONG GetProofAttrs( struct ProofOwner *po, ULONG tag1, ... )
-
- FUNCTION
- Gets specified information in the taglist from proof owner structure.
-
- INPUTS
- po - pointer to a struct ProofOwner.
- taglist - pointer to a tag list, containing the information to get.
-
- PFN_ProofOwnerID - Retrieves the owner ID of this
- structure. (UBYTE *)
-
- PFN_ProofOwnerIdent - Retrieves the ident string for this
- structure. (char **)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- SetProofOwnerAttrsA()
-
- proof.library/GetProofOwnerEntry proof.library/GetProofOwnerEntry
-
- NAME
- GetProofOwnerEntry -- Get the name of a group/category from a proof owner
-
- SYNOPSIS
- result = GetProofOwnerEntry( po, group, category )
- a0 d0 d1
-
- char *GetProofOwnerEntry( struct ProofOwner *po, BYTE group,
- BYTE category )
-
- FUNCTION
- Gets the name of group/category from the specified proof owner.
-
- INPUTS
- po - Pointer to a struct ProofOwner.
- group - A group number from 0 to 3.
- category - A category number from 0 to 22 or POWN_GROUP_NAME to get the
- name of the group.
-
- RESULT
- result - returns NULL if no entry defined, or a pointer to a NULL
- terminated string.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- SetProofOwnerEntry()
-
- proof.library/IsProofA proof.library/IsProofA
-
- NAME
- IsProofA -- Tests if a file is a proof file
- IsProof -- Varargs stub for IsProofA
-
- SYNOPSIS
- result = IsProofA( pathname, taglist )
- a0 a1
-
- BOOL IsProofA( char *pathname, struct TagItem *taglist )
-
- result = IsProof( pathname, tag1, ... )
-
- BOOL IsProof( char *pathname, ULONG tag1, ... )
-
- FUNCTION
- Tests if the specified path/filename is a proof file. If the file does
- not exist, FALSE will be returned.
-
- INPUTS
- pathname - pointer to a string containing the complete path and filename
- of the file to test.
- taglist - pointer to an optional tag list.
-
- PFN_AllowPhotoAlbum - If TRUE, allow photoalbum proofs (jfif format)
- to be read. (Default TRUE)
-
- PFN_TestProofByProtection - If TRUE, use the proof protection bit to
- determine if the file is a proof. This negates the
- PFN_AllowPhotoAlbum tag. (default TRUE)
-
- RESULT
- result - returns TRUE if pathname is a proof, otherwise FALSE. FALSE
- will also be returned if the file does not exist.
-
- WARNING
- How the file type is determined is private! This may be changed in the
- future. You MUST use the library functions to determine if a file is
- indeed a proof file.
-
- BUGS
- Some file system handlers, notably for CD, do not return the all or any
- protectionbits. To eliminate this as a problem for detecting proofs
- stored on these devices, you can set the environment variable:
- proof.library/Test_Proof_By_Protection to "no". This will disable using
- protection bits for proof detection for all applications using the
- library.
-
- SEE ALSO
- IsProofFromLockA()
-
- proof.library/IsProofFromLockA proof.library/IsProofFromLockA
-
- NAME
- IsProofFromLockA -- Tests if the lock is a proof file
- IsProofFromLock -- Varargs stub for IsProofFromLockA
-
- SYNOPSIS
- result = IsProofFromLockA( lock, taglist )
- a0 a1
-
- BOOL IsProofFromLockA( BPTR lock, struct TagItem *taglist )
-
- result = IsProofFromLock( BPTR lock, tag1, ... )
-
- BOOL IsProofFromLock( BPTR lock, ULONG tag1, ... )
-
- FUNCTION
- Tests if the specified lock is a proof file. If the file does not
- exist, FALSE will be returned.
-
- INPUTS
- lock - lock on the file to test.
- taglist - pointer to an optional tag list.
-
- PFN_AllowPhotoAlbum - If TRUE allow photoalbum proofs (jfif format)
- to be read. (Default TRUE)
-
- PFN_TestProofByProtection - If TRUE, use the proof protection bit to
- determine if the file is a proof. This negates the
- PFN_AllowPhotoAlbum tag. (default TRUE)
-
- RESULT
- result - returns TRUE if lock is a proof, otherwise FALSE.
-
- WARNING
- How the file type is determined is private! This may be changed in the
- future. You MUST use the library functions to determine if a file is
- indeed a proof file.
-
- BUGS
- Some file system handlers, notably for CD, do not return the all or any
- protectionbits. To eliminate this as a problem for detecting proofs
- stored on these devices, you can set the environment variable:
- proof.library/Test_Proof_By_Protection to "no". This will disable using
- protection bits for proof detection for all applications using the
- library.
-
- SEE ALSO
- IsProofA()
-
- proof.library/LoadProofA proof.library/LoadProofA
-
- NAME
- LoadProofA -- Load a proof from disk
- LoadProof -- Varargs stub for LoadProofA
-
- SYNOPSIS
- err = LoadProofA( filename, pf, taglist )
- a0 a1 a2
-
- ULONG LoadProofA( char *filename, struct Proof **pf,
- struct TagItem *taglist )
-
- err = LoadProofA( filename, pf, tag1, ... )
-
- ULONG LoadProof( char *filename, struct Proof **pf,
- ULONG tag1, ... )
-
- FUNCTION
- Loads a proof structure from disk into memory using the filename,
- applying the specified tags. Should be matched with a call to
- FreeProof() if call returns successfully.
- Supplying a pointer to a pointer containing NULL (empty pointer to
- pointer) is valid. A proof structure will be allocated for you and
- returned in your pointer (no need to call AllocProof() in this case), if
- an error occurs whilst loading, you are however not required to call
- FreeProof().
-
- INPUTS
- filename - filename of proof to load.
- pf - pointer to a struct Proof pointer (contents may be NULL).
- taglist - pointer to an optional tag list.
-
- PFN_AllowPhotoAlbum - If TRUE allow photoalbum proofs (jfif format)
- to be read. (Default TRUE)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
- If you are calling this function in a loop, be sure to NULL the passed in
- proof pointer every time the function is called, otherwise you will
- overwrite the previously allocated proof.
-
- BUGS
-
- SEE ALSO
- FreeProof(), LoadProofFromLockA(), LoadProofFromBPTRA()
-
- proof.library/LoadProofFromBPTRA proof.library/LoadProofFromBPTRA
-
- NAME
- LoadProofFromBPTRA -- Load a proof from an open BPTR file pointer.
- LoadProofFromBPTR -- Varargs stub for LoadProofFromBPTRA
-
- SYNOPSIS
- err = LoadProofFromBPTRA( fp, pf, taglist )
- a0 a1 a2
-
- ULONG LoadProofBPTRA( BPTR fp, struct Proof **pf,
- struct TagItem *taglist )
-
- err = LoadProofFromBPTRA( fp, pf, tag1, ... )
-
- ULONG LoadProofFromBPTR( BPTR fp, struct Proof **pf, ULONG tag1, ... )
-
- FUNCTION
- Loads a proof structure from disk into memory using the already open AND
- positioned AmigaDOS file BPTR pointer, applying the specified tags.
- Should be matched with a call to FreeProof() if call returns
- successfully. Supplying a pointer to a pointer containing NULL (empty
- pointer to pointer) is valid. A proof structure will be allocated for
- you and returned in your pointer (no need to call AllocProof() in this
- case), if an error occurs whilst loading, you are however not required
- to call FreeProof().
-
- INPUTS
- BPTR - already opened AND positioned AmigaDOS BPTR pointer of proof to
- load.
- pf - pointer to a struct Proof pointer (contents may be NULL).
- taglist - pointer to an optional tag list.
-
- PFN_AllowPhotoAlbum - If TRUE allow photoalbum proofs (jfif format)
- to be read. (Default TRUE)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
- If you are calling this function in a loop, be sure to NULL the passed in
- proof pointer every time the function is called, otherwise you will
- overwrite the previously allocated proof.
-
- Remember to pass in an OPEN and POSITIONED BPTR to this function.
-
- BUGS
-
- SEE ALSO
- FreeProof(), LoadProofA(), LoadProofFromLockA()
-
- proof.library/LoadProofFromLockA proof.library/LoadProofFromLockA
-
- NAME
- LoadProofFromLockA -- Load a proof from disk
- LoadProofFromLock -- Varargs stub for LoadProofFromLockA
-
- SYNOPSIS
- err = LoadProofFromLockA( lock, pf, taglist )
- a0 a1 a2
-
- ULONG LoadProofFromLockA( BPTR lock, struct Proof **pf,
- struct TagItem *taglist )
-
- err = LoadProofFromLockA( lock, pf, tag1, ... )
-
- ULONG LoadProofFromLock( BPTR lock, struct Proof **pf,
- ULONG tag1, ... )
-
- FUNCTION
- Loads a proof structure from disk into memory using the lock. Should be
- matched with a call to FreeProof().
- Supplying a NULL pointer is valid. A proof structure will be allocated
- for you and returned in your pointer - if an error occurs whilst loading,
- you are however not required to call FreeProof(). Don't forget to
- free the supplied lock after calling this function.
-
- INPUTS
- lock - lock on proof to load.
- pf - pointer to a struct Proof pointer (contents may be NULL).
- taglist - pointer to an optional tag list.
-
- PFN_AllowPhotoAlbum - If TRUE allow photoalbum proofs (jfif format)
- to be read. (Default TRUE)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- FreeProof(), LoadProofA(), LoadProofFromBPTRA()
-
- proof.library/LoadProofOwnerA proof.library/LoadProofOwnerA
-
- NAME
- LoadProofOwnerA -- Load a proof owner from disk
- LoadProofOwner -- Varargs stub for LoadProofOwnerA
-
- SYNOPSIS
- err = LoadProofOwnerA( filename, po, taglist )
- a0 a1 a2
-
- ULONG LoadProofOwnerA( char *filename, struct ProofOwner **po,
- struct TagItem *taglist )
-
- err = LoadProofOwnerA( filename, po, tag1, ... )
-
- ULONG LoadProofOwner( char *filename, struct ProofOwner **po,
- ULONG tag1, ... )
-
- FUNCTION
- Loads a proof owner file into memory, using the filename and applying the
- specified tags. Should be matched with a call to FreeProofOwner() if call
- returns successfully.
- Supplying a pointer to a pointer containing NULL (empty pointer to
- pointer) is valid. A proof owner structure will be allocated for you and
- returned in your pointer (no need to call AllocProofOwner() in this
- case), if an error occurs whilst loading, you are however not required
- to call FreeProofOwner().
-
- INPUTS
- filename - filename of proof owner to load.
- pf - pointer to a struct ProofOwner pointer (contents may be NULL).
- taglist - pointer to an optional tag list.
-
- PFN_MemoryPool - A memory pool pointer to allocate memory for the
- nodes.
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- NOTE
- If you intend to use the PFN_MemoryPool tag, you MUST pass the same
- memory pool pointer (result from CreatePool) to every function called in
- proof.library.
-
- WARNING
- If you are calling this function in a loop, be sure to NULL the passed in
- proofowner pointer every time the function is called, otherwise you will
- overwrite the previously allocated proofowner.
-
- BUGS
-
- SEE ALSO
- FreeProofOwner()
-
- proof.library/SaveProofA proof.library/SaveProofA
-
- NAME
- SaveProofA -- Save a proof to disk
- SaveProof -- Varargs stub for SaveProofA
-
- SYNOPSIS
- err = SaveProofA( pf, taglist )
- a0 a1
-
- ULONG SaveProofA( struct Proof **pf, struct TagItem *taglist )
-
- err = SaveProofA( pf, tag1, ... )
-
- ULONG SaveProof( struct Proof **pf, ULONG tag1, ... )
-
- FUNCTION
- Save a proof structure to disk, using the specified tags.
-
- INPUTS
- pf - pointer to a struct Proof pointer.
- taglist - pointer to an optional tag list. (For a complete list of
- available tags, see the SetProofAttrsA() function).
-
- PFN_ProofPath - Specifies the path to save the generated proof file.
- Using this tag, implies that the proof is a linked proof.
- Appropriate information will be saved in the proof file to allow
- relocation of the proof fiel with respect to the original image.
- If unspecified, the proof is saved into the images' directory
- with a slightly different filename. No files will be overwritten
- by this process!
-
- PFN_CustomBuffer - Specifies a pointer to a custom buffer to save
- (implies PFN_CustomBufferSize).
-
- PFN_CustomBufferSize - Specifies the size in bytes of the custom
- buffer to save (implies PFN_CustomBuffer).
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- FreeProof()
-
- proof.library/SaveProofOwnerA proof.library/SaveProofOwnerA
-
- NAME
- SaveProofOwnerA -- Save a proof owner structure to disk
- SaveProofOwner -- Varargs stub for SaveProofOwnerA
-
- SYNOPSIS
- err = SaveProofOwnerA( po, taglist )
- a0 a1
-
- ULONG SaveProofOwnerA( struct ProofOwner *po, struct TagItem *taglist )
-
- err = SaveProofOwnerA( po, tag1, ... )
-
- ULONG SaveProofOwner( struct ProofOwner *po, ULONG tag1, ... )
-
- FUNCTION
- Save a proof owner structure to disk, using the specified tags.
-
- INPUTS
- po - pointer to a struct ProofOwner.
- taglist - pointer to an optional tag list.
-
- PFN_ProofOwnerName - Specifies the path/filename to save the proof
- owner into. No files will be overwritten by this process!
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- proof.library/SetProofAttrsA proof.library/SetProofAttrsA
-
- NAME
- SetProofAttrsA -- Set attributes of a proof
- SetProofAttrs -- Varargs stub for SetProofAttrsA
-
- SYNOPSIS
- result = SetProofAttrsA( pf, taglist )
- a0 a1
-
- ULONG SetProofAttrsA( struct Proof *pf, struct TagItem *taglist )
-
- result = SetProofAttrs( pf, tag1, ... )
-
- ULONG SetProofAttrs( struct Proof *pf, ULONG tag1, ... )
-
- FUNCTION
- Sets specified information from the taglist into the proof. Will also
- resave the proof if it has already been saved.
-
- INPUTS
- pf - pointer to a struct Proof.
- taglist - pointer to a tag list, containing the information to set.
-
- Header specific tags:
- PFN_ProofWidth - Specifies the width in pixels of the Proof
- image. Values range from 0 to 255. (UBYTE)
-
- PFN_ProofHeight - Specifies the Height in pixels of the Proof
- image. Values range from 0 to 255. (UBYTE)
-
- PFN_ProofAspectX - Specifies the X aspect ratio of the Proof image.
- The format is the same as in a DisplayInfo structure. (WORD)
-
- PFN_ProofAspectY - Specifies the Y aspect ratio of the Proof image.
- The format is the same as in a DisplayInfo structure. (WORD)
-
- PFN_ProofQuestionable - Specifies that image content of the
- Proof is of a dubious nature. Use this in a browser to
- determine which thumbnails to show at any given time (BOOL)
-
- PFN_ProofBodyType - Specifies the format of the proof image data.
- See proof.h for proof format definitions.
-
- PFN_ProofBodyFlags - Additional flags for proof body data.
- See proof.h for flag definitions.
-
- Description specific tags:
- PFN_ImageWidth - Specifies the width in pixels of the original
- image. Values range from 1 to 2147483647. (ULONG)
-
- PFN_ImageHeight - Specifies the height in pixels of the original
- image. Values range from 1 to 2147483647. (ULONG)
-
- PFN_ImageFileSize - Specifies the byte count of the original image
- (AmigaDOS file size). Values range from 1 to 2147483647. (ULONG)
-
- PFN_ImageFormat - Specifies the file format of the original image
- (eg JPEG, GIF etc). Valid values are defined in proof.h
-
- PFN_ImageDepth - Specifies the depth of the original image. See
- proof.h for the use of this value. Values range from 0 to 255.
- (UBYTE)
-
- PFN_CategoryOwner - Specifies the id of the owners category file.
- Values range from 0 to 255. (UBYTE)
-
- PFN_ImageGroup - Specifies the group this image belongs to. Values
- range from 0 to 3. (UBYTE)
-
- PFN_ImageCategory - Specifies the category this image belongs to.
- Values are bitwise for 22 bits of a ULONG. This allows images to
- be categorized into more than one category. (ULONG)
-
- PFN_ImagePlanar - Specifies that the original image is in a planar
- format. (BOOL)
-
- PFN_ImageChunky - Specifies that the original image is in a chunky
- format. (BOOL)
-
- PFN_ImageHAM6 - Specifies that the original image is in the HAM6
- format. (BOOL)
-
- PFN_ImageHalfBrite - Specifies that the original image is in the
- halfbrite format. (BOOL)
-
- PFN_ImageHAM8 - Specifies that the original image is in the HAM8
- format. (BOOL)
-
- PFN_Image24Bit - Specifies that the original image is a 24 bit
- format. (BOOL)
-
- PFN_ImageFlags - Specifies bulk flags descriptions (see proof.h)
-
- PFN_ImageComment - Specifies a comment string (unlimited length) to
- be saved along with the proof. (char *)
-
- Save specific tags:
- PFN_ImageName - Specifies the file name (excluding the path) of the
- original image. If you use this tag, you should also supply a
- PFN_ImagePath tag. (char *)
-
- PFN_ImagePath - Specifies the path of the original image. If you use
- this tag, you should also supply a PFN_ImageName tag. (char *)
-
- PFN_ImagePathName - Specifies the path and filename of the original
- image. This is mutually exclusive with PFN_ImageName and
- PFN_ImagePath tags. (char *)
-
- PFN_DescriptionChunk - Specifies if a TDSC chunk should be written to
- the proof file (default TRUE).
-
- Miscellaneous tags
- PFN_UserData - Sets the user data field. (ULONG)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- proof.library/SetProofOwnerAttrsA proof.library/SetProofOwnerAttrsA
-
- NAME
- SetProofOwnerAttrsA -- Set attributes of a proof owner structure
- SetProofOwnerAttrs -- Varargs stub for SetProofAttrsOwnerA
-
- SYNOPSIS
- result = SetProofOwnerAttrsA( po, taglist )
- a0 a1
-
- ULONG SetProofOwnerAttrsA( struct ProofOwner *po,
- struct TagItem *taglist )
-
- result = SetProofOwnerAttrs( po, tag1, ... )
-
- ULONG SetProofAttrs( struct ProofOwner *po, ULONG tag1, ... )
-
- FUNCTION
- Sets specified information from the taglist into the proof owner.
-
- INPUTS
- po - pointer to a struct ProofOwner.
- taglist - pointer to a tag list, containing the information to set.
-
- PFN_ProofOwnerID - Specifies the owner ID of this structure. Values
- range from 0 to 255. (UBYTE)
-
- PFN_ProofOwnerIdent - Specifies the name of the owner of this
- structure. Setting to NULL, removes the ident string. (char *)
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- GetProofOwnerAttrsA()
-
- proof.library/SetProofOwnerEntry proof.library/SetProofOwnerEntry
-
- NAME
- SetProofOwnerEntry -- Set the name of a group/category in a proof owner
-
- SYNOPSIS
- result = SetProofOwnerEntry( po, group, category, name )
- a0 d0 d1 d2
-
- ULONG SetProofOwnerEntry( struct ProofOwner *po, BYTE group,
- BYTE category, char *name )
-
- FUNCTION
- Sets the name of group/category in the specified proof owner. You can
- remove an entry by setting it to NULL. You can set the groups name, by
- passing POWN_GROUP_NAME as the category.
-
- INPUTS
- po - Pointer to a struct ProofOwner.
- group - A group number from 0 to 3.
- category - A category number from 0 to 22 or POWN_GROUP_NAME to specify
- the name of the group.
- name - The name to set the entry to, or NULL to remove the entry.
-
- RESULT
- err - returns PFERR_NONE if successful, otherwise an error code.
- See proof.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
- GetProofOwnerEntry()
-
- proof.library/ValidProofDesc proof.library/ValidProofDesc
-
- NAME
- ValidProofDesc -- Establish if a proof has a description
-
- SYNOPSIS
- result = ValidProofDesc( pf )
- a0
-
- BOOL ValidProofDesc( struct proof *pf )
-
- FUNCTION
- Establishes if a proof contains an image descriptor.
-
- INPUTS
- pf - pointer to a struct Proof.
-
- RESULT
- err - returns TRUE if the proof contains a valid description or FALSE if
- not.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
-