/* Copyright (C) 2017-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4bifa.ctr */ #ifndef DK4BIFA_H_INCLUDED /** Avoid multiple inclusions. */ #define DK4BIFA_H_INCLUDED 1 #line 9 "dk4bifa.ctr" /** @file dk4bifa.h Bitmap image file analysis. */ #ifndef DK4CONF_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4conf.h" #else #include #endif #endif #ifndef DK4ERROR_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4error.h" #else #include #endif #endif #ifndef DK4BIFTY_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4bifty.h" #else #include #endif #endif #ifdef __cplusplus extern "C" { #endif /** Analyze bitmap image file, apply the following tests: - If the image is RGB or CMYK, if R=G=B or C=M=Y for each pixel, writing gray output is sufficient. - If the image contains an alpha channel and alpha data indicates full opacity for all pixels, we can ignore the alpha channel. - If we can reduce the number of bits per component (bits per sample) for all samples of all pixels without quality loss, do so. @param pcs Address of color space variable (in/out). @param pbd Address of bit depth (in/out). @param bif Bitmap image file. @param anb Flag: Analyze bit depth. @param anc Flag: Analyze color usage. @param ana Flag: Analyze alpha channel usage. @param erp Error report, may be NULL. @return 1 on success, 0 on error. Error codes: - DK4_E_INVALID_ARGUMENTS
if: - bif is NULL, - pcs is NULL while color or alpha analysis is requested, or - pbd is NULL while bit depth analysis is requested. - DK4_E_SYNTAX
if an error occured while retrieving a pixel. */ int dk4bif_analyze( int *pcs, dk4_px_bit_depth_t *pbd, dk4_bif_t const *bif, int anb, int anc, int ana, dk4_er_t *erp ); #ifdef __cplusplus } #endif /* vim: set ai sw=4 ts=4 : */ #endif