/*************************************************************************************************************************************/ /* */ /* T R A N S F O R M A T I O N D I T E " P H O T O M A T O N " */ /* ( U T I L E S U R T O U T P O U R L E S F O R M A T S D ' I M A G E P U I S S A N C E S D E 2 ) : */ /* */ /* */ /* Definition : */ /* */ /* Cette commande genere une image */ /* dont le nom est le premier argument */ /* d'appel ; elle est le resultat de */ /* la transformation dite "photomaton" */ /* de l'image Argument. */ /* */ /* */ /* Author of '$xci/photomaton$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20031223111833). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* T R A N S F O R M A T I O N D I T E " P H O T O M A T O N " */ /* ( U T I L E S U R T O U T P O U R L E S F O R M A T S D ' I M A G E P U I S S A N C E S D E 2 ) : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE)); /*..............................................................................................................................*/ GET_ARGUMENTSi(nombre_d_arguments ,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_imageA); GET_ARGUMENT_C("imageR=""R=",nom_imageR); GET_ARGUMENT_I("fx=""fX=",Itransformation_photomaton_____facteur_de_reduction_en_X); GET_ARGUMENT_I("fy=""fY=",Itransformation_photomaton_____facteur_de_reduction_en_Y); ) ); CALi(Inoir(ImageR)); /* Initialisation de l'image Resultat. */ Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageA,nom_imageA)))) Bblock /* Chargement de la premiere image Argument. */ CALS(Itransformation_photomaton(ImageR,ImageA)); /* Transformation "photomaton"... */ /* */ /* Je note le 20081008101403 qu'evidemment cette transformation ne retombe sur ses pieds */ /* au bout de N iterations que si 'dimX' et 'dimY' sont egales et egales a une puissance */ /* de 2 (en mode 'Std', N=9 c'est-a-dire le logarithme en base 2 de 'dimX' et de 'dimY'). */ CALi(Iupdate_image(nom_imageR,ImageR)); Eblock ATes Bblock Test__CODE_ERREUR__ERREUR07; Eblock ETes RETU_Commande; Eblock ECommande