/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N S   P O U R   L E S   C O N V E R S I O N S   D E   F O R M A T  :                                     */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Definition :                                                                                                               */
/*                                                                                                                                   */
/*                    Ce fichier contient toutes les definitions                                                                     */
/*                  de base de conversion inter-formats des                                                                          */
/*                  images raster, quelle que soit la definition.                                                                    */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xiii/conversion$DEF' :                                                                                         */
/*                                                                                                                                   */
/*                    Jean-Francois Colonna (LACTAMME, 19880000000000).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        M I S E   A   L ' E C H E L L E   D ' U N   N I V E A U  :                                                                 */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   SCALE_POINT(noir_2,blanc_2,acces_point,noir_1,blanc_1)                                                                        \
                    ADD2(SCAL(SOUS(FLOT(acces_point)                                                                                    \
                                  ,FLOT(noir_1)                                                                                         \
                                   )                                                                                                    \
                             ,SOUS(FLOT(blanc_1)                                                                                        \
                                  ,FLOT(noir_1)                                                                                         \
                                   )                                                                                                    \
                             ,SOUS(FLOT(blanc_2)                                                                                        \
                                  ,FLOT(noir_2)                                                                                         \
                                   )                                                                                                    \
                              )                                                                                                         \
                        ,FLOT(noir_2)                                                                                                   \
                         )                                                                                                              \
                                        /* Fonction de conversion d'un niveau de [noir_1,blanc_1] dans [noir_2,blanc_2].             */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O N V E R S I O N   " S T A N D A R D "   -->   " I N T "  :                                                             */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   Istd_int_____RENORMALISER_LES_NIVEAUX                                                                                         \
                    VRAI                                                                                                                \
                                        /* Afin de renormaliser les niveaux lors des conversions de 'Istd_int(...)'.                 */
#define   Istd_int_____LAISSER_INTACT_LES_NIVEAUX                                                                                       \
                    NOTL(Istd_int_____RENORMALISER_LES_NIVEAUX)                                                                         \
                                        /* Afin de conserver exactement les niveaux lors des conversions de 'Istd_int(...)'.         */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O N V E R S I O N   " RVB "  -->   " HLS "   D ' U N E   I M A G E  :                                                    */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   gIconversion_RVB_en_HLS(les_images_sont_standards,imRH,FimRH,imRL,FimRL,imRS,FimRS,imAR,FimAR,imAV,FimAV,imAB,FimAB)          \
                    gCALC(EST_VRAI(les_images_sont_standards)                                                                           \
                         ,Iconversion_RVB_en_HLS(imRH,imRL,imRS,imAR,imAV,imAB)                                                         \
                         ,IFconversion_RVB_en_HLS(FimRH,FimRL,FimRS,FimAR,FimAV,FimAB)                                                  \
                          )                                                                                                             \
                                        /* Conversion "RVB"-->"HLS" d'une image quelconque ("standard" ou "flottante"). Ceci a       */ \
                                        /* ete introduit le 20111206093601.                                                          */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O N V E R S I O N   " HLS "  -->   " RVB "   D ' U N E   I M A G E  :                                                    */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   gIconversion_HLS_en_RVB(les_images_sont_standards,imRR,FimRR,imRV,FimRV,imRB,FimRB,imAH,FimAH,imAL,FimAL,imAS,FimAS)          \
                    gCALC(EST_VRAI(les_images_sont_standards)                                                                           \
                         ,Iconversion_HLS_en_RVB(imRR,imRV,imRB,imAH,imAL,imAS)                                                         \
                         ,IFconversion_HLS_en_RVB(FimRR,FimRV,FimRB,FimAH,FimAL,FimAS)                                                  \
                          )                                                                                                             \
                                        /* Conversion "RVB"-->"HLS" d'une image quelconque ("standard" ou "flottante"). Ceci a       */ \
                                        /* ete introduit le 20111206093601.                                                          */



Copyright © Jean-François Colonna, 2019-2021.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / Ecole Polytechnique, 2019-2021.