
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (96)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (3950)
-
Revision ed22179a82 : Rewrite HORIZx4 and HORIZx8 in subpixel filter functions In subpixel filters, p
3 octobre 2013, par Yunqing WangChanged Paths :
Modify /vp9/common/x86/vp9_subpixel_8t_ssse3.asm
Rewrite HORIZx4 and HORIZx8 in subpixel filter functionsIn subpixel filters, prefetched source data, unrolled loops,
and interleaved instructions.In HORIZx4, integrated the idea in Scott's CL (commit :
d22a504d11a15dc3eab666859db0046b5a7d75c5), which was suggested by
Erik/Tamar from Intel. Further tweaking was done to combine row 0,
2, and row 1, 3 in registers to do more 2-row-in-1 operations until
the last add.Test showed a 2% decoder speedup.
Change-Id : Ib53d04ede8166c38c3dc744da8c6f737ce26a0e3
-
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 :
-
-
Fill patterns
My work life has been quite busy lately and I haven’t had a chance to sit down and blog. I have been touring around London and some parts of the northern England consulting and organizing some training here and there. Luckily I have had the chance to do some work on Imagick and the 2.2.0 beta release is getting closer. The internal structure was completely restructured and broken down into several smaller files. During this time Imagick was adapted to follow the PHP Coding Standards more closely. Still a work in progress
I committed slightly modified version of this example to PHP Manual http://uk.php.net/manual/en/imagick.examples.php page a few days ago. The example illustrates using an image as a part of a named fill pattern. The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc). The code itself is pretty straight forward : Read the image, create the pattern and use the pattern as a fill.
The ice formations image is from http://www.photoeverywhere.co.uk/west/winterholiday/slides/iceformations5679.htm.
-
< ?php
-
-
/* Create a new imagick object */
-
$im = new Imagick( ’iceformations5679.JPG’ ) ;
-
-
/* Create imagickdraw object */
-
$draw = new ImagickDraw() ;
-
-
/* Start a new pattern called "ice" */
-
$draw->pushPattern( ’ice’ , 0 , 0 , 50 , 50 ) ;
-
-
/* Composite the image on the pattern */
-
$draw->composite( Imagick: :COMPOSITE_OVER, 0, 0, 50, 50, $im ) ;
-
-
/* Close the pattern */
-
$draw->popPattern() ;
-
-
/* Use the pattern called "ice" as the fill */
-
$draw->setFillPatternURL( ’#ice’ ) ;
-
-
/* Set font size to 52 */
-
$draw->setFontSize( 52 ) ;
-
-
/* Annotate some text */
-
$draw->annotation( 5, 50, "Hello World !" ) ;
-
-
/* Create a new canvas and white image */
-
$canvas = new Imagick() ;
-
$canvas->newImage( 310, 70, "white" ) ;
-
-
/* Add black border around the resulting image */
-
$canvas->borderImage( ’black’, 1, 1 ) ;
-
-
/* Draw the ImagickDraw on to the canvas */
-
$canvas->drawImage( $draw ) ;
-
-
/* Set the format to PNG */
-
$canvas->setImageFormat( ’png’ ) ;
-
-
/* Output the image */
-
header( "Content-Type : image/png" ) ;
-
echo $canvas ;
-
?>
And the result is here :
-