Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (63)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (6743)

  • About image opacity

    23 octobre 2013, par Mikko Koppanen — Imagick

    There is a common misconception that Imagick::setImageOpacity() would work to reduce the opacity of the image. However, as the name says the method actually sets the opacity throughout the image and thus affects also transparent areas.

    To demonstrate let’s first look at this image of a red circle on a transparent background :

    Now, let’s apply setImageOpacity on the image :

    1. < ?php
    2. $im = new Imagick (’red-circle.png’) ;
    3. $im->setImageOpacity (0.5) ;
    4. $im->writeImage (’red-circle-setopacity.png’) ;
    5.  ?>

    As we can see from the resulting image the transparent background is affected as well.

    In order to actually reduce the opacity of the opaque parts Imagick::evaluateImage can be used instead :

    1. < ?php
    2. $im = new Imagick (’red-circle.png’) ;
    3.  
    4. /* Divide the alpha channel value by 2 */
    5. $im->evaluateImage(Imagick: :EVALUATE_DIVIDE, 2, Imagick: :CHANNEL_ALPHA) ;
    6. $im->writeImage (’red-circle-divide.png’) ;
    7.  ?>

    And here are the results :

    As the background is already fully transparent so the divide operation causes no changes to it.

    Similar example is available in the PHP manual http://php.net/imagick.evaluateimage and I added a note to setImageOpacity page as well (at the time of writing it has not synced to documentation mirrors yet).

  • d3d11va : Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY

    4 juillet 2017, par Martin Storsjö
    d3d11va : Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
    

    If using the winstore compat library, a fallback LoadLibrary
    function does exist, that only calls LoadPackagedLibrary though
    (which doesn’t work for dynamically loading d3d11 DLLs).

    Therefore explicitly check the targeted API family instead.

    Make this check a reusable HAVE_* component which other parts
    of the libraries can check when necessary as well.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] configure
    • [DBH] libavutil/hwcontext_d3d11va.c
  • Ffmpeg is installed, but I get the exception : You do not have ffmpeg installed on your machine

    13 janvier 2023, par Tin Kommen

    I've searched for hours for a solution, but I haven't found one yet. Maybe someone here knows what is going wrong.

    &#xA;

    I'm trying to make a Bar Chart Race in Python. Although I have downloaded and installed Ffmpeg,&#xA;I keep on getting multiple errors :

    &#xA;

        MovieWriter ffmpeg unavailable; using Pillow instead.&#xA;    Traceback (most recent call last):&#xA;      File "/Users/___/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/matplotlib/animation.py", line 251, in saving&#xA;        yield self&#xA;      File "/Users/___/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/matplotlib/animation.py", line 1161, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/Users/____/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/matplotlib/animation.py", line 549, in grab_frame&#xA;        renderer = self.fig.canvas.get_renderer()&#xA;    AttributeError: &#x27;FigureCanvasBase&#x27; object has no attribute &#x27;get_renderer&#x27;&#xA;&#xA;    During handling of the above exception, another exception occurred:&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/Users/___/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/bar_chart_race/_make_chart.py", line 435, in make_animation&#xA;        ret_val = anim.save(self.filename, fps=self.fps, writer=self.writer)&#xA;      File "/Users/___/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/matplotlib/animation.py", line 1161, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line         100, in __exit__&#xA;        self.gen.throw(type, value, traceback)&#xA;      File "/Users/___/PycharmProjects/data_visualization/venv/lib/python3.6/site-                        packages/matplotlib/animation.py", line 253, in saving&#xA;        self.finish()&#xA;              File "/Users/____/PycharmProjects/data_visualization/venv/lib/python3.6/site-        packages/matplotlib/animation.py", line 554, in finish&#xA;        self._frames[0].save(&#xA;            IndexError: list index out of range&#xA;&#xA;    During handling of the above exception, another exception occurred:&#xA;&#xA;    Exception: You do not have ffmpeg installed on your machine. Download&#xA;    ffmpeg from here: https://www.ffmpeg.org/download.html.&#xA;    Matplotlib&#x27;s original error message below:&#xA;    list index out of range&#xA;

    &#xA;

    I've tried installing ffmpeg with conda, pip and homebrew. When I check the version, i get the following :

    &#xA;

        ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers&#xA;      built with clang version 9.0.1&#xA;      configuration: --prefix=/Users/___/opt/miniconda3 --cc=x86_64-apple-darwin13.4.0-clang --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-libx264 --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame&#xA;      libavutil      56. 31.100 / 56. 31.100&#xA;      libavcodec     58. 54.100 / 58. 54.100&#xA;      libavformat    58. 29.100 / 58. 29.100&#xA;      libavdevice    58.  8.100 / 58.  8.100&#xA;      libavfilter     7. 57.100 /  7. 57.100&#xA;      libavresample   4.  0.  0 /  4.  0.  0&#xA;      libswscale      5.  5.100 /  5.  5.100&#xA;      libswresample   3.  5.100 /  3.  5.100&#xA;      libpostproc    55.  5.100 / 55.  5.100&#xA;

    &#xA;

    Here is the code :

    &#xA;

        import numpy as np&#xA;    import pandas as pd&#xA;    import bar_chart_race as bcr&#xA;    import os&#xA;&#xA;&#xA;&#xA;    df = pd.read_csv(&#x27;/Users/____/Documents/data/dummy_data.csv&#x27;, delimiter=&#x27;;&#x27;, encoding="utf-8-sig")&#xA;    bcr.bar_chart_race(&#xA;        df=df,&#xA;        filename=&#x27;test_win2.mov&#x27;,&#xA;        orientation=&#x27;h&#x27;,&#xA;        sort=&#x27;desc&#x27;,&#xA;        n_bars=8,&#xA;        fixed_order=False,&#xA;        fixed_max=False,&#xA;        steps_per_period=50,&#xA;        interpolate_period=False,&#xA;        label_bars=True,&#xA;        bar_size=.95,&#xA;        period_label={&#x27;x&#x27;: .99, &#x27;y&#x27;: .25, &#x27;ha&#x27;: &#x27;right&#x27;, &#x27;va&#x27;: &#x27;center&#x27;},&#xA;        period_summary_func=lambda v, r: {&#x27;x&#x27;: .99, &#x27;y&#x27;: .18,&#xA;                                  &#x27;s&#x27;: f&#x27;Totaal: {v.nlargest(8).sum():,.0f}&#x27;,&#xA;                                  &#x27;ha&#x27;: &#x27;right&#x27;, &#x27;size&#x27;: 8, &#x27;family&#x27;: &#x27;Courier New&#x27;},&#xA;        perpendicular_bar_func=&#x27;median&#x27;,&#xA;        figsize=(3.5, 3),&#xA;        period_length=100,&#xA;        dpi=300,&#xA;        cmap=&#x27;dark12&#x27;,&#xA;        title=&#x27;Title?&#x27;,&#xA;        title_size=&#x27;&#x27;,&#xA;        bar_label_size=4,&#xA;        tick_label_size=4,&#xA;        shared_fontdict={&#x27;family&#x27;: &#x27;Helvetica&#x27;, &#x27;color&#x27;: &#x27;.1&#x27;},&#xA;        scale=&#x27;linear&#x27;,&#xA;        writer=None,&#xA;        fig=None,&#xA;        bar_kwargs={&#x27;alpha&#x27;: .3},&#xA;        filter_column_colors=False)&#xA;

    &#xA;