/*************************************************************************************************************************************/ /* */ /* C O N V E R S I O N " RVB " --> " HLS " : */ /* */ /* */ /* Definition : */ /* */ /* Cette commande permet de passer d'un */ /* triplet d'images {ROUGE,VERTE,BLEUE} a */ /* un triplet {Hue,Luminance,Saturation}. */ /* */ /* */ /* Author of '$xci/RVB_en_HLS$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 1996??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N T E R F A C E ' listG ' : */ /* */ /* */ /* :Debut_listG: */ /* :Fin_listG: */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F I C H I E R S D ' I N C L U D E S : */ /* */ /*************************************************************************************************************************************/ #include INCLUDES_BASE #include image_image_IMAGESF_EXT /* Introduit le 20111206094830... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #define imageAR \ Image_ROUGE #define imageAV \ Image_VERTE #define imageAB \ Image_BLEUE #define imageFAR \ IFmage_ROUGE #define imageFAV \ IFmage_VERTE #define imageFAB \ IFmage_BLEUE #define imageRH \ ImageA1 #define imageRL \ ImageA2 #define imageRS \ ImageA3 #define imageFRH \ IFmageA1 #define imageFRL \ IFmageA2 #define imageFRS \ IFmageA3 #include xci/luminance.01.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C O N V E R S I O N " RVB " --> " HLS " : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_UNDEF)); /* Nom de l'image {TEINT,LUMIN,SATUR} a utiliser (ce mode "HLS" implicite a ete introduit */ /* le 20111216102409). */ DEFV(CHAR,INIC(POINTERc(nom_imageRH),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_imageRL),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_imageRS),NOM_PIPE)); /* Nom du triplet {Hue,Luminance,Saturation} a generer. */ DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_UNDEF)); /* Nom de l'image {ROUGE,VERTE,BLEUE} a utiliser (ce mode "RVB" implicite a ete introduit */ /* le 20050920152358). */ DEFV(CHAR,INIC(POINTERc(nom_imageAR),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_imageAV),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_imageAB),NOM_PIPE)); /* Nom du triplet {ROUGE,VERTE,BLEUE} a convertir. */ /*..............................................................................................................................*/ GET_ARGUMENTSi(nombre_d_arguments ,BLOC(GET_ARGUMENT_L("PASSAGE_RVB_HLS_____compatibilite_20120911=""compatibilite_20120911=" ,PASSAGE_RVB_HLS_____compatibilite_20120911 ); /* Argument introduit le 20120911134419... */ GET_ARGUMENT_C("imageA=""A=",nom_imageA); GET_ARGUMENT_C("Rouge=""ROUGE=""AR=",nom_imageAR); GET_ARGUMENT_C("Verte=""VERTE=""AV=",nom_imageAV); GET_ARGUMENT_C("Bleue=""BLEUE=""AB=",nom_imageAB); GET_ARGUMENT_C("imageR=""R=",nom_imageR); /* Argument introduit le 20111216102409... */ GET_ARGUMENT_C("imageRH=""RH=""Hue=",nom_imageRH); GET_ARGUMENT_C("imageRL=""RL=""Luminance=",nom_imageRL); GET_ARGUMENT_C("imageRS=""Saturation=""RS=",nom_imageRS); GET_ARGUMENT_L("standard=",les_images_sont_standards); /* Possibilite introduite le 20111206094824... */ ) ); CALi(gInettoyage(les_images_sont_standards,imageRH,imageFRH)); CALi(gInettoyage(les_images_sont_standards,imageRL,imageFRL)); CALi(gInettoyage(les_images_sont_standards,imageRS,imageFRS)); /* Introduit le 20081010214849 car manquait... */ GENERER_LE_NOM_DE_TROIS_COMPOSANTES_CHROMATIQUES_RVB(nom_imageA,nom_imageAR,nom_imageAV,nom_imageAB) /* Introduit le 20050920152358... */ GENERER_LE_NOM_DE_TROIS_COMPOSANTES_CHROMATIQUES_HLS(nom_imageR,nom_imageRH,nom_imageRL,nom_imageRS) /* Introduit le 20111216102409... */ Test(PAS_D_ERREUR(CODE_ERROR(gIload_image(les_images_sont_standards,imageAR,imageFAR,nom_imageAR)))) Bblock Test(PAS_D_ERREUR(CODE_ERROR(gIload_image(les_images_sont_standards,imageAV,imageFAV,nom_imageAV)))) Bblock Test(PAS_D_ERREUR(CODE_ERROR(gIload_image(les_images_sont_standards,imageAB,imageFAB,nom_imageAB)))) Bblock CALS(gIconversion_RVB_en_HLS(les_images_sont_standards ,imageRH,imageFRH,imageRL,imageFRL,imageRS,imageFRS ,imageAR,imageFAR,imageAV,imageFAV,imageAB,imageFAB ) ); /* Passage du systeme 'RVB' au systeme 'HLS'. */ CALi(gIupdate_image(les_images_sont_standards,nom_imageRH,imageRH,imageFRH)); CALi(gIupdate_image(les_images_sont_standards,nom_imageRL,imageRL,imageFRL)); CALi(gIupdate_image(les_images_sont_standards,nom_imageRS,imageRS,imageFRS)); Eblock ATes Bblock Test__CODE_ERREUR__ERREUR07; Eblock ETes Eblock ATes Bblock Test__CODE_ERREUR__ERREUR07; Eblock ETes Eblock ATes Bblock Test__CODE_ERREUR__ERREUR07; Eblock ETes RETU_Commande; Eblock ECommande