Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (100)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (6609)

  • Padding thumbnail with color

    9 juin 2010, par Mikko Koppanen — Imagick, PHP stuff

    I know, it’s been a while since I last blogged. This is because a lot of things are happening in my personal life. I recently relocated to London from Finland and started a new job. Things are quite busy but I will try to post an example now and then. In the meanwhile I would like to hear about sites using Imagick, so if your project is not super secret please post an url and maybe a small explanation what you’re doing with Imagick on the site. This is purely for my personal interest.

    Anyway, to the point. Today’s example originates from a question asked by a user. How do I thumbnail the image inside given dimensions proportionally and fill the “blank” areas with a color ? Well, the answer is here :)

    The code is for Imagick 2.1.0 but adapting to older versions should not be hard.

    1. < ?php
    2. /* Define width and height of the thumbnail */
    3. $width = 100 ;
    4. $height = 100 ;
    5.  
    6. /* Instanciate and read the image in */
    7. $im = new Imagick( "test.png" ) ;
    8.  
    9. /* Fit the image into $width x $height box
    10.  The third parameter fits the image into a "bounding box" */
    11. $im->thumbnailImage( $width, $height, true ) ;
    12.  
    13. /* Create a canvas with the desired color */
    14. $canvas = new Imagick() ;
    15. $canvas->newImage( $width, $height, ’pink’, ’png’ ) ;
    16.  
    17. /* Get the image geometry */
    18. $geometry = $im->getImageGeometry() ;
    19.  
    20. /* The overlay x and y coordinates */
    21. $x = ( $width - $geometry[’width’] ) / 2 ;
    22. $y = ( $height - $geometry[’height’] ) / 2 ;
    23.  
    24. /* Composite on the canvas */
    25. $canvas->compositeImage( $im, imagick: :COMPOSITE_OVER, $x, $y ) ;
    26.  
    27. /* Output the image*/
    28. header( "Content-Type : image/png" ) ;
    29. echo $canvas ;
    30.  
    31.  ?>

    The source image :
    test.png

    The resulting image :
    testphp.png

  • Creating a reflection

    9 juin 2010, par Mikko Koppanen — Imagick, PHP stuff

    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.

    1. < ?php
    2.  
    3. /* Read the image */
    4. $im = new Imagick( "strawberry.png" ) ;
    5.  
    6. /* Thumbnail the image */
    7. $im->thumbnailImage( 200, null ) ;
    8.  
    9. /* Create a border for the image */
    10. $im->borderImage( "white", 5, 5 ) ;
    11.  
    12. /* Clone the image and flip it */
    13. $reflection = $im->clone() ;
    14. $reflection->flipImage() ;
    15.  
    16. /* Create gradient. It will be overlayd on the reflection */
    17. $gradient = new Imagick() ;
    18.  
    19. /* Gradient needs to be large enough for the image
    20. and the borders */
    21. $gradient->newPseudoImage( $reflection->getImageWidth() + 10,
    22.               $reflection->getImageHeight() + 10,
    23.               "gradient:transparent-black"
    24.             ) ;
    25.  
    26. /* Composite the gradient on the reflection */
    27. $reflection->compositeImage( $gradient, imagick: :COMPOSITE_OVER, 0, 0 ) ;
    28.  
    29. /* Add some opacity */
    30. $reflection->setImageOpacity( 0.3 ) ;
    31.  
    32. /* Create empty canvas */
    33. $canvas = new Imagick() ;
    34.  
    35. /* Canvas needs to be large enough to hold the both images */
    36. $width = $im->getImageWidth() + 40 ;
    37. $height = ( $im->getImageHeight() * 2 ) + 30 ;
    38. $canvas->newImage( $width, $height, "black", "png" ) ;
    39.  
    40. /* Composite the original image and the reflection on the canvas */
    41. $canvas->compositeImage( $im, imagick: :COMPOSITE_OVER, 20, 10 ) ;
    42. $canvas->compositeImage( $reflection, imagick: :COMPOSITE_OVER,
    43.             20, $im->getImageHeight() + 10 ) ;
    44.  
    45. /* Output the image*/
    46. header( "Content-Type : image/png" ) ;
    47. echo $canvas ;
    48.  
    49.  ?>

    The source image :

    source

    And the result :

    result

    P.S. Please send me some new images which I can use in these examples ;)

  • The Future of the VP8 Bitstream

    18 juin 2010, par noreply@blogger.com (John Luther) — vp8

    Recently we’ve seen software products such as VLC, FFmpeg, Logitech Vid, Flumotion and Tixeo adopting and using WebM and VP8 (the video codec in WebM) in exciting new ways.

    In addition to software developers, many hardware vendors have committed to shipping VP8-accelerated products based on our current bitstream in 2011 . Devices that use hardware acceleration for video are a very small percentage of overall web traffic today, but they are a rapidly growing segment of the market and our project must be mindful of these vendors’ needs. Given the longer lead times for changes in chipsets, hardware companies implementing the codec today need to be confident that it will be stable and supported as VP8 content proliferates.

    Like every codec, WebM is not immune to change ; the difference in our project is that the improvements are publicly visible, and compatibility and implementation issues can be worked through in an open forum.

    So, to maintain codec stability while also allowing for quality and performance improvements in VP8, we have added an experimental branch to the VP8 source tree. The WebM community can use this unstable branch to propose changes to VP8 that will produce the best video codec possible, but without the constraints of a frozen bitstream. At some point in the future, when the experimental branch proves significantly better than the stable branch, we will create a new version of the codec.

    Teams dedicated to improving WebM are actively investigating and evaluating new techniques, and are committed to do so for the long term. We encourage the WebM community to keep contributing as well. To learn more about the experimental branch and get involved, see our repository layout page.

    Jim Bankoski is Codec Engineering Manager at Google.