
Recherche avancée
Autres articles (93)
-
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (12024)
-
Perspective transformations
Finally (after a long break) I managed to force myself to update the PHP documentation and this time it was distortImage code example. Things have been hectic lately but that does not quite explain the 6 months(?) break between this and the previous post. As a matter of a fact there is no excuse for such a long silence so I will try to update this blog a bit more often from now on.
Back in the day I used to blog the examples and update the documentation if I remembered but I am trying to fix this bad habit. Most of the latest examples have been updated in to the manual. In the case of the two last examples I updated the documentation first and then blogged on the subject.
I took some time to actually understand the perspective transformations properly using the excellent ImageMagick examples (mainly created by Anthony Thyssen) as a reference. The basic idea of perspective distortion seems simple : to distort the control points to new locations. Grabbing the syntax for Imagick was easy, an array of control point pairs in the form of :
-
array(source_x, source_y, dest_x, dest_y ... )
The following example uses the built-in checkerboard pattern to demonstrate perspective distortion :
-
< ?php
-
/* Create new object */
-
$im = new Imagick() ;
-
-
/* Create new checkerboard pattern */
-
$im->newPseudoImage(100, 100, "pattern:checkerboard") ;
-
-
/* Set the image format to png */
-
$im->setImageFormat(’png’) ;
-
-
/* Fill background area with transparent */
-
$im->setImageVirtualPixelMethod(Imagick: :VIRTUALPIXELMETHOD_TRANSPARENT) ;
-
-
/* Activate matte */
-
$im->setImageMatte(true) ;
-
-
/* Control points for the distortion */
-
$controlPoints = array( 10, 10,
-
10, 5,
-
-
10, $im->getImageHeight() - 20,
-
10, $im->getImageHeight() - 5,
-
-
$im->getImageWidth() - 10, 10,
-
$im->getImageWidth() - 10, 20,
-
-
$im->getImageWidth() - 10, $im->getImageHeight() - 10,
-
$im->getImageWidth() - 10, $im->getImageHeight() - 30) ;
-
-
/* Perform the distortion */
-
$im->distortImage(Imagick: :DISTORTION_PERSPECTIVE, $controlPoints, true) ;
-
-
/* Ouput the image */
-
header("Content-Type : image/png") ;
-
echo $im ;
-
?>
Here is the source image :
And the result :
-
-
How to configure FFMPEG in PHP 5.2.17 and IIS 7 environment
29 mars 2014, par KRAI have working PHP 5.2.17 (thread safe) in IIS 7 / Windows 7.
I want to setup FFMPEG in my local server.
I downloaded php ext from this link : 1.html">http://www.4shared.com/zip/YZkvqY6v/ffmpeg-php-win32-all_1.html
Then I followed this tutorial : http://blog.halomede.com/2009/03/ffmpeg-php-installation-on-windows.html
But ffmpeg is not displaying in phpinfo() ; as they mentioned in tutorial.
Can you please let me know what wrong I am doing ? It will be very helpful.
Thank you,
-
How to convert .flv file to .3gp using ffmpeg ? [migrated]
19 octobre 2011, par ChetanaI have converted any video format to 3gp file format using ffmpeg on one server.
But on another server it not works.Following is my script :
exec("ffmpeg -i test.flv -sameq -acodec libmp3lame -ar 22050 -ab 96000
-deinterlace -nr 500 -s 320x240 -aspect 4:3 -r 20 -g 500 -me_range 20
-b 270k -deinterlace -f flv -y test.3gp ");Can anyone tell me what is wrong in script ?
Following is my ffmpeg setting :
root@ninja [ ]# ffmpeg -formats
ffmpeg version CVS, build 3277056, Copyright (c) 2000-2004 Fabrice Bellard
configuration : —enable-mp3lame —enable-libogg —enable-gpl —disable-mmx
—enable-shared
built on Jun 17 2009 10:51:43, gcc : 4.1.2 20080704 (Red Hat 4.1.2-44)