INM home

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re : imagin



ouais...le principe est loin d'etre bete!!

merci Seb!

CrrCrr

PS: gregoire c mon nom!!! PITIE!!! m'appelez pas comme ca!!!!!

> -----Message d'origine-----
> De : .séb [mailto:jesus@oeilpouroeil.fr]
> Envoyé : mercredi 11 septembre 2002 14:33
> À : pistes-l@director-fr.com
> Objet : RE: Re : imagin
> 
> 
> sALUT grEGOIRE
> 
> > sauf que je vais en reduire la largeur selon un coefficient d'ou des
> > calculs, etc...
> > c'etait juste pour eviter de rentrer dans des boucles qui durent
> > des plombes
> 
> > >
> > > Si tu connais le nbre d'images que tu vas mettre cote à cote
> > > ce n'est pas
> > > tres dur de connaitre la largeur totale de ton bandeau.
> 
> tu peux aussi imaginer une fonction qui ajoute une image à la 
> dorite d'une
> autre... et retournant une image aux dimensions appropriées.
> on JuxtaposeImage (iLeft, iRight) ------------------------------------
>   -- INPUTS : iLeft, iRight <#image>
>   -- OUTPUT : <#image>
>   -------
> 
>   -- on check les paramètres
>   if (ilk(iLeft) <> #image)  then return VOID
>   if (ilk(iRight) <> #image) then return VOID
> 
>   rLeft  = iLeft.rect
>   rRight = iRight.rect
> 
>   -- on crée la nouvelle image
>   nHauteurMax = max(rLeft.height, rRight.max)
>   nLargeur    = rLeft.width + rRight.width
>   -- on force en 24 bits par simplicité
>   iBuffer = image(nLargeur, nHauteurMax, 24)
> 
>   -- on copie les images
>   rDest = rLeft
>   iBuffer.copyPixels(iLeft, rDest, rLeft)
>   rDest = rRight.offset(rLeft.width, 0)
>   iBuffer.copyPixels(iRight, rDest, rRight)
> 
>   -- on retourne l'image
>   return iBuffer
> end -- JuxtaposeImage handler
> 
> -- sample use : member("dest").image = JuxtaposeImage 
> (member("A").image,
> member("B").image)
> 
> testée en vitesse ca marche bien!
> 
> bonne journée,
> séb
> 


pistes-l List Home | Main Index | Thread Index
Search archives

 

 


© 2002 Integration New Media. All rights reserved.
Legal | Sitemap

 

Services Solutions Products Support Gallery Store Download Feedback Contact About Us