
Recherche avancée
Autres articles (50)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (7580)
-
Building opencv3 with ffmpeg
7 novembre 2015, par liuge[ 40%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
In file included from /home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘void CvCapture_FFMPEG::close()’:
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:317:36:
error: ‘avcodec_free_frame’ was not declared in this scope
avcodec_free_frame(&picture);
^
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::open(const char*)’:
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:632:43: error: ‘avcodec_alloc_frame’ was not declared in this scope
picture = avcodec_alloc_frame();
^
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:635:41: error: ‘PIX_FMT_BGR24’ was not declared in this scope
avpicture_get_size( PIX_FMT_BGR24,
^
/home/liuge/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)’:
.......it works when i type
-D WITH_FFMPEG=OFF
how do i build CV with FFmpeg ? -
doc : add styles for good/bad code examples
13 septembre 2024, par Marvin Scholz -
Creating a reflection
Here is a simple example of creating a reflection of an image. The reflection is created by flipping the image and overlaying a gradient on it. Then both, the original image and the reflection is overlayed on a canvas.
This example is created for Imagick 2.1.x but with a little tuning it should work with earlier versions.
-
< ?php
-
-
/* Read the image */
-
$im = new Imagick( "strawberry.png" ) ;
-
-
/* Thumbnail the image */
-
$im->thumbnailImage( 200, null ) ;
-
-
/* Create a border for the image */
-
$im->borderImage( "white", 5, 5 ) ;
-
-
/* Clone the image and flip it */
-
$reflection = $im->clone() ;
-
$reflection->flipImage() ;
-
-
/* Create gradient. It will be overlayd on the reflection */
-
$gradient = new Imagick() ;
-
-
/* Gradient needs to be large enough for the image
-
and the borders */
-
$gradient->newPseudoImage( $reflection->getImageWidth() + 10,
-
$reflection->getImageHeight() + 10,
-
"gradient:transparent-black"
-
) ;
-
-
/* Composite the gradient on the reflection */
-
$reflection->compositeImage( $gradient, imagick: :COMPOSITE_OVER, 0, 0 ) ;
-
-
/* Add some opacity */
-
$reflection->setImageOpacity( 0.3 ) ;
-
-
/* Create empty canvas */
-
$canvas = new Imagick() ;
-
-
/* Canvas needs to be large enough to hold the both images */
-
$width = $im->getImageWidth() + 40 ;
-
$height = ( $im->getImageHeight() * 2 ) + 30 ;
-
$canvas->newImage( $width, $height, "black", "png" ) ;
-
-
/* Composite the original image and the reflection on the canvas */
-
$canvas->compositeImage( $im, imagick: :COMPOSITE_OVER, 20, 10 ) ;
-
$canvas->compositeImage( $reflection, imagick: :COMPOSITE_OVER,
-
20, $im->getImageHeight() + 10 ) ;
-
-
/* Output the image*/
-
header( "Content-Type : image/png" ) ;
-
echo $canvas ;
-
-
?>
The source image :
And the result :
P.S. Please send me some new images which I can use in these examples
-