
Recherche avancée
Autres articles (56)
-
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (5354)
-
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 :
-
-
FFmpeg compile for Android (configure, make)
11 août 2013, par manutdI want to compile ffmpeg for Android ver.
But everytime I try, I can't compile the source of ffmpeg.
I think my configuration option may be invalid.I used this script for configure.
#!/bin/sh
NDK_PATH=$HOME/android-ndk-r8
PREBUILT=$NDK_PATH/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
LDFLAGS="-Wl,-T,$PREBUILT/armelf_linux_eabi.x -Wl,-rpath-link=$NDK_PATH/platforms/android-8/arch-arm/usr/lib \
-L$NDK_PATH/platforms/android-8/arch-arm/usr/lib -nostdlib $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtbegin.o \
$PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtend.o -lc -lm -ldl"
COMMON_CONFIG="\
./configure --target-os=linux \
--arch=arm \
--enable-cross-compile \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--as=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--sysinclude=$NDK_PATH/platforms/android-8/arch-arm/usr/include \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--extra-ldflags=\"$LDFLAGS\" \
--extra-cflags=-I$NDK_PATH/platforms/android-8/arch-arm/usr/include \
eval "$COMMON_CONFIG"
if [ $? -ne 0 ]; then
exit 1
fiI have to give compiler a new header file path (by —extra-cflags) because when I typed 'make', compiler didn't know where are header files (like math.h, ctime.h)
After configure using this scripts and type 'make', I got these error.
CC libavdevice/alldevices.o
In file included from /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/stdlib.h:42,
from ./libavutil/common.h:35,
from ./libavutil/avutil.h:126,
from libavdevice/avdevice.h:22,
from libavdevice/alldevices.c:22:
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:49: warning: redundant redeclaration of 'index'
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:47: note: previous declaration of 'index' was here
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:50: warning: redundant redeclaration of 'strcasecmp'
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:57: note: previous declaration of 'strcasecmp' was here
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:51: warning: redundant redeclaration of 'strncasecmp'
/Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:58: note: previous declaration of 'strncasecmp' was here
In file included from ./libavutil/internal.h:178,
from ./libavutil/common.h:342,
from ./libavutil/avutil.h:126,
from libavdevice/avdevice.h:22,
from libavdevice/alldevices.c:22:
./libavutil/libm.h:62: error: static declaration of 'lrint' follows non-static declaration
./libavutil/libm.h:69: error: static declaration of 'lrintf' follows non-static declaration
./libavutil/libm.h:76: error: static declaration of 'round' follows non-static declaration
./libavutil/libm.h:90: error: static declaration of 'trunc' follows non-static declaration
make: *** [libavdevice/alldevices.o] Error 1What is the wrong ?
Does my configuration have wrong info ? or any missing flag ?OS : Mac Lion
Android-ndk ver : android-ndk-r8 -
How to use ffmpeg's sws_scale from multiple threads ?
25 avril 2013, par AsikI have a color space conversion function based on sws_scale. It will be called from multiple different threads during the lifetime of the application. I don't know, however, how thread-safe sws_scale is and I did not find it mentionned in its documentation.
I would assume that each thread requires its own SwsContext as this parameter will be shared, but is this enough to guarantee there won't be any internal collisions ?