Recherche avancée

Médias (91)

Autres articles (82)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10273)

  • Evolution #4567 : balise introduction

    3 octobre 2020, par josiane aletto

    En fait la balise #INTRODUCTION,permet d’avoir une introduction automatique en nettoyant BIEN le texte même si la rédacteur n’utilise pas les balises intro.

    mais cette balise prend le contenu du descriptif /chapo et si vide regarde si il ya intro et sinontravaille sur le texte

     

    Cependant on eut utiliser par ailleurs la balise #DESCRIPTIF et dans ce cas on voudrais utiliser l’equivalent de #INTRODUCTION directement sur #TEXTE sans que cela reprenne le descriptif

     

    pouvoir faire un truc du genre

     

    [#GETdesc,n|==o|oui )#INTRODUCTION800]

    [#GETdesc ,n|==n|oui )#INTRODUCTION_TEXTE800] en ne prenant pas en compte le descriptif/chapo

     

     

     

    ou sinon un couper qui nettoit effectivement le texte

    j’ai essayé

     

    [#GETintro,n|==n|oui )[(#TEXTE|couper1000, ’...’|textebrut)] et differente variantes mais les raccourcis portant sur des paragraphes restent alors que #INTRODUCTION donne un résultat ne comportant que du texte.

     

    je ne sais pas si j’ai été plus claire

    merci

     

     
     

     

     

     

     

     

    Message du 03/10/20 13:53
    De :
    A :
    Copie à :
    Objet : [SPIP - Evolution #4567] balise introduction

    La demande #4567a été mise à jour par b b.

    Version cible mis à 3.4

    Pas certain que ça réponde à ta demande, mais as-tu connaissance des balises https://www.weblog.eliaz.fr/article72.html ?

    Sinon, je ne comprends pas ces deux parties de ton ticket :

    avec éventuellement le texte entre intro car ce filtre coupe correctement le texte sans laisser des raccourcis et autre element genant

    Tu parles de la balise que je cite ?

    ou pouvoir couper le texte sans que les raccourcis sur des paragraphes restent dans le texte couper

    Qu’entends-tu par "les raccourcies sur les paragraphes" ?

    Evolution #4567 : balise introduction

    Auteur : josiane aletto
    Statut : Nouveau
    Priorité : Normal
    Assigné à :
    Catégorie :
    Version cible : 3.4
    Resolution :

    avoir l’equivalent de la balise introduction par exemple balise introduction_texte qui va chercher l’introduction uniquement dans le texte avec éventuellement le texte entre intro car ce filtre coupe correctement le texte sans laisser des raccourcis et autre element genant
    ou pouvoir couper le texte sans que les raccourcis sur des paragraphes restent dans le texte couper

    Vous recevez ce mail car vous êtes impliqués sur ce projet.
    Pour changer les préférences d’envoi de mail, allez sur http://core.spip.net/my/account

  • Camera app fails on android ffmpeg application

    22 mars 2021, par connor449

    I am trying to run a simple video recorder app on android. The code is below :

    


    package com.example.camera&#xA;&#xA;//import android.R&#xA;import android.content.DialogInterface&#xA;import android.content.pm.PackageManager&#xA;import android.os.Build&#xA;import android.os.Bundle&#xA;import android.widget.Toast&#xA;import androidx.appcompat.app.AlertDialog&#xA;import androidx.appcompat.app.AppCompatActivity&#xA;import androidx.core.app.ActivityCompat&#xA;import androidx.core.content.ContextCompat&#xA;import com.arthenica.mobileffmpeg.FFmpeg&#xA;&#xA;&#xA;const val EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"&#xA;&#xA;class MainActivity : AppCompatActivity() {&#xA;    override fun onCreate(savedInstanceState: Bundle?) {&#xA;        super.onCreate(savedInstanceState)&#xA;        setContentView(R.layout.activity_main)&#xA;        if (checkPermission()) {&#xA;            //main logic or main code&#xA;           FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")&#xA;&#xA;            // . write your main code to execute, It will execute if the permission is already given.&#xA;        } else {&#xA;            requestPermission()&#xA;        }&#xA;    }&#xA;&#xA;    private fun checkPermission(): Boolean {&#xA;        return if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;            != PackageManager.PERMISSION_GRANTED&#xA;        ) {&#xA;            // Permission is not granted&#xA;            false&#xA;        } else true&#xA;    }&#xA;&#xA;    private fun requestPermission() {&#xA;        ActivityCompat.requestPermissions(&#xA;            this, arrayOf(android.Manifest.permission.CAMERA),&#xA;            PERMISSION_REQUEST_CODE&#xA;        )&#xA;    }&#xA;&#xA;    override fun onRequestPermissionsResult(&#xA;        requestCode: Int,&#xA;        permissions: Array<string>,&#xA;        grantResults: IntArray&#xA;    ) {&#xA;        when (requestCode) {&#xA;            PERMISSION_REQUEST_CODE -> if (grantResults.size > 0 &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED&#xA;            ) {&#xA;                Toast.makeText(applicationContext, "Permission Granted", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;&#xA;                // main logic&#xA;            } else {&#xA;                Toast.makeText(applicationContext, "Permission Denied", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                    if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;                        != PackageManager.PERMISSION_GRANTED&#xA;                    ) {&#xA;                        showMessageOKCancel("You need to allow access permissions",&#xA;                            DialogInterface.OnClickListener { dialog, which ->&#xA;                                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                                    requestPermission()&#xA;                                }&#xA;                            })&#xA;                    }&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    private fun showMessageOKCancel(&#xA;        message: String,&#xA;        okListener: DialogInterface.OnClickListener&#xA;    ) {&#xA;        AlertDialog.Builder(this@MainActivity)&#xA;            .setMessage(message)&#xA;            .setPositiveButton("OK", okListener)&#xA;            .setNegativeButton("Cancel", null)&#xA;            .create()&#xA;            .show()&#xA;    }&#xA;&#xA;    companion object {&#xA;        private const val PERMISSION_REQUEST_CODE = 200&#xA;    }&#xA;}&#xA;&#xA;&#xA;</string>

    &#xA;

    The main command to call the video recorder is here :

    &#xA;

               FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")&#xA;

    &#xA;

    The app opens on my android 10 Motorola G Power. I tap 'allow' for allowing permissions. Then the app crashes and I keep getting this error :

    &#xA;

    2021-03-22 13:42:51.534 31138-31138/com.example.camera E/AndroidRuntime: FATAL EXCEPTION: main&#xA;    Process: com.example.camera, PID: 31138&#xA;    java.lang.IllegalStateException: Could not find method sendMessage(View) in a parent or ancestor Context for android:onClick attribute defined on view class com.google.android.material.button.MaterialButton with id &#x27;button2&#x27;&#xA;        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:436)&#xA;        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:393)&#xA;        at android.view.View.performClick(View.java:7161)&#xA;        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:967)&#xA;        at android.view.View.performClickInternal(View.java:7133)&#xA;        at android.view.View.access$3500(View.java:804)&#xA;        at android.view.View$PerformClick.run(View.java:27416)&#xA;        at android.os.Handler.handleCallback(Handler.java:883)&#xA;        at android.os.Handler.dispatchMessage(Handler.java:100)&#xA;        at android.os.Looper.loop(Looper.java:241)&#xA;        at android.app.ActivityThread.main(ActivityThread.java:7617)&#xA;        at java.lang.reflect.Method.invoke(Native Method)&#xA;        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)&#xA;        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)&#xA;2021-03-22 13:42:51.546 31138-31138/com.example.camera I/Process: Sending signal. PID: 31138 SIG: 9&#xA;

    &#xA;

    What am I doing wrong ? Please advise.

    &#xA;

    edit

    &#xA;

    layout xml

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;&#xA;&#xA;    &#xA;&#xA;    &#xA;&#xA;

    &#xA;

  • ImageMagick to crop image based on based on rectangular border color

    3 septembre 2021, par Alvie Mahmud

    I have some images that I would like to crop but hopefully via command line rather than doing each one manually.

    &#xA;

    I would like to crop the image (I've cropped top half, desaturated other colours and split frames with ffmpeg) based on where there is a border of a certain color (#31393C in this case). For example, I would like this image :&#xA;enter image description here&#xA;to be cropped like this :
    &#xA;enter image description here

    &#xA;

    I have tried some commands but they aren't working for me unfortunately.

    &#xA;

    convert image.jpg -bordercolor "#31393C" -border 2x2 -fuzz 10% -trim output.jpg&#xA;

    &#xA;

    I have also tried to make the parts that aren't #31393C to be filled with white and then cropping which may potentially work as a solution as I want to improve the ability to use OCR :

    &#xA;

    convert image.jpg -fill white -fuzz 11% &#x2B;opaque "#31393c" result.jpg&#xA;convert result.jpg -bordercolor white -border 10x10 -fuzz 10% -trim output.jpg&#xA;

    &#xA;

    which works somewhat but not perfectly :&#xA;enter image description here

    &#xA;