/* Copyright (C) 2018-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: dk4bifap.ctr */ #ifndef DK4BIFAP_H_INCLUDED /** Avoid multiple inclusions. */ #define DK4BIFAP_H_INCLUDED 1 #line 7 "dk4bifap.ctr" /** @file dk4bifap.h Bitmap image file handling with application support. */ #ifndef DK4CONF_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4conf.h" #else #include #endif #endif #ifndef DK4APP_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4app.h" #else #include #endif #endif #ifndef DK4BIF_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4bif.h" #else #include #endif #endif #ifdef __cplusplus extern "C" { #endif /** Open bitmap image file by name. @param fn Input file name. @param honly Flag: Read image header only. @param pcsctx Color space conversion context, may be NULL. @param app Application structure for diagnostics, may be NULL. @return Valid pointer to bitmap image file on success, NULL on error. */ dk4_bif_t * dk4bif_open_app( dkChar const *fn, int honly, dk4_cs_conv_ctx_t const *pcsctx, dk4_app_t *app ); /** Open bitmap image file by opened FILE. @param fipo File, opened for binary reading. @param fn File name containing the bitmap image. Provide a dummy file name here when processing stdin. @param ty Image file type (PNG, JPEG or TIFF). @param honly Flag: Read image header only. @param pcsctx Color space conversion context, may be NULL. @param app Application structure for diagnostics, may be NULL. @return Valid pointer to bitmap image file on success, NULL on error. */ dk4_bif_t * dk4bif_open_file_app( FILE *fipo, dkChar const *fn, int ty, int honly, dk4_cs_conv_ctx_t const *pcsctx, dk4_app_t *app ); /** Find bitmap image file type for file name based on suffix. @param fn File name to find type for. @param app Application structure for diagnostics, may be NULL. */ int dk4bif_type_for_suffix_app( dkChar const *fn, dk4_app_t *app ); /** Issue warning about aspect ratio change. @param bif Bitmap image file containing data about old resolution. @param xres New x resolution. @param yres New y resolution. @param app Application structure for diagnostics, may be NULL. */ void dk4bif_warn_aspect_ratio_change( dk4_bif_t *bif, double xres, double yres, dk4_app_t *app ); /** Set image resolution. @param bif Bitmap image file. @param xres New x resolution. @param yres New y resolution. @param app Application structure for diagnostics, may be NULL. @return 1 on success, 0 on error. */ int dk4bif_set_res_app( dk4_bif_t *bif, double xres, double yres, dk4_app_t *app ); #ifdef __cplusplus } #endif /* vim: set ai sw=4 ts=4 : */ #endif