Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (106)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (12864)

  • Pygame : Frame ghosting ?

    5 octobre 2022, par Sam Tubb

    I am working on a animation environment in python using pygame. The user draw's each frame, and then using ffmpeg the animation is saved as an .avi movie. I would like to implement a feature, but am not sure how.. frame ghosting. Like display the previous frame while you draw the current.

    



    I tried creating a surface called ghost that copies the current frame when the next-frame key is pressed. Then draws it with an alpha level of 10, but this didn't work out correctly.

    



    I am not sure what to do, here is the source code for anyone that thinks they have an idea :

    



    #Anim8

import pygame,subprocess,shutil
from os import makedirs
from pygame.locals import *
from random import randrange
pygame.init()
screen=pygame.display.set_mode((740,580))
draw=pygame.Surface((740,540))
draw.fill((200,200,200))
bcol=(200,200,200)
gui=pygame.Surface((740,40))
gui.fill((50,50,50))
size=2
color=(0,0,0)
screen.fill((200,200,200))
prevcol=0
newcol=0
f=0
msg=''
framerate=60
try:
    makedirs('anim')
except:
    pass
def DrawColors(x,y):
    pygame.draw.rect(gui, (255,0,0), (x+3,y+3,15,15),0)
    pygame.draw.rect(gui, (0,0,0), (x+3,y+21,15,15),0)
    pygame.draw.rect(gui, (0,255,0), (x+21,y+3,15,15),0)
    pygame.draw.rect(gui, (200,200,200), (x+21,y+21,15,15),0)
    pygame.draw.rect(gui, (0,0,255), (x+39,y+3,15,15),0)
while True:
    pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
    mse=pygame.mouse.get_pos()
    screen.blit(gui, (0,0))
    DrawColors(0,0)
    screen.blit(draw,(0,40))
    key=pygame.key.get_pressed()
    if key[K_1]:
        framerate=10
        msg='Frame Rate set to 10'
    if key[K_2]:
        framerate=20
        msg='Frame Rate set to 20'
    if key[K_3]:
        framerate=30
        msg='Frame Rate set to 30'
    if key[K_4]:
        framerate=40
        msg='Frame Rate set to 40'
    if key[K_5]:
        framerate=50
        msg='Frame Rate set to 50'
    if key[K_6]:
        framerate=60
        msg='Frame Rate set to 60'
    if key[K_7]:
        framerate=70
        msg='Frame Rate set to 70'
    if key[K_8]:
        framerate=80
        msg='Frame Rate set to 80'
    if key[K_9]:
        framerate=90
        msg='Frame Rate set to 90'
    if key[K_0]:
        framerate=100
        msg='Frame Rate set to 100'

    if key[K_a]:
        pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
        f+=1
    for e in pygame.event.get():
        if e.type==QUIT:
            shutil.rmtree('anim')
            exit()
        if e.type==KEYDOWN:
            if e.key==K_s:
                msg='Added Frame!'
                pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
                f+=1
            if e.key==K_c:
                draw.fill(bcol)
            if e.key==K_r:
                name='anim'+str(randrange(0,999))+str(randrange(0,999))+'.avi'
                msg='Rendering: '+name
                pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
                subprocess.call('ffmpeg -f image2 -s 640x480 -i anim/frame%01d.png -r '+str(framerate)+' '+name,shell=True)
                msg='Done!'
            if e.key==K_p:
                subprocess.call('ffplay '+name,shell=True)
        if e.type==MOUSEBUTTONDOWN:
            if e.button==1:
                try:
                    prevcol=color
                    newcol=gui.get_at(mse)
                    if newcol==(50,50,50):
                        newcol=prevcol
                    color=newcol
                except:
                    pass
            if e.button==3:
                try:
                    prevcol=bcol
                    newcol=gui.get_at(mse)
                    if newcol==(50,50,50):
                        newcol=prevcol
                    draw.fill(newcol)
                    bcol=newcol
                except:
                    pass
            if e.button==4:
                size+=1
                if size>7:
                    size=7
            if e.button==5:
                size-=1
                if size==0:
                    size=1 
        if e.type == pygame.MOUSEMOTION:
            lineEnd = pygame.mouse.get_pos()
            lineEnd = (lineEnd[0],lineEnd[1]-40)
            if pygame.mouse.get_pressed() == (1, 0, 0):
                    pygame.draw.line(draw, color, lineStart, lineEnd, size)
            lineStart = lineEnd

    pygame.display.flip()


    



    Oh, and on another note, just if anyone was curious, here is what the output looks like.. I made a little new year's animation :

    



    Animation Test

    


  • Pygame : Frame ghosting ?

    31 décembre 2013, par Sam Tubb

    I am working on a animation environment in python using pygame. The user draw's each frame, and then using ffmpeg the animation is saved as an .avi movie. I would like to implement a feature, but am not sure how.. frame ghosting. Like display the previous frame while you draw the current.

    I tried creating a surface called ghost that copies the current frame when the next-frame key is pressed. Then draws it with an alpha level of 10, but this didn't work out correctly.

    I am not sure what to do, here is the source code for anyone that thinks they have an idea :

    #Anim8

    import pygame,subprocess,shutil
    from os import makedirs
    from pygame.locals import *
    from random import randrange
    pygame.init()
    screen=pygame.display.set_mode((740,580))
    draw=pygame.Surface((740,540))
    draw.fill((200,200,200))
    bcol=(200,200,200)
    gui=pygame.Surface((740,40))
    gui.fill((50,50,50))
    size=2
    color=(0,0,0)
    screen.fill((200,200,200))
    prevcol=0
    newcol=0
    f=0
    msg=''
    framerate=60
    try:
       makedirs('anim')
    except:
       pass
    def DrawColors(x,y):
       pygame.draw.rect(gui, (255,0,0), (x+3,y+3,15,15),0)
       pygame.draw.rect(gui, (0,0,0), (x+3,y+21,15,15),0)
       pygame.draw.rect(gui, (0,255,0), (x+21,y+3,15,15),0)
       pygame.draw.rect(gui, (200,200,200), (x+21,y+21,15,15),0)
       pygame.draw.rect(gui, (0,0,255), (x+39,y+3,15,15),0)
    while True:
       pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
       mse=pygame.mouse.get_pos()
       screen.blit(gui, (0,0))
       DrawColors(0,0)
       screen.blit(draw,(0,40))
       key=pygame.key.get_pressed()
       if key[K_1]:
           framerate=10
           msg='Frame Rate set to 10'
       if key[K_2]:
           framerate=20
           msg='Frame Rate set to 20'
       if key[K_3]:
           framerate=30
           msg='Frame Rate set to 30'
       if key[K_4]:
           framerate=40
           msg='Frame Rate set to 40'
       if key[K_5]:
           framerate=50
           msg='Frame Rate set to 50'
       if key[K_6]:
           framerate=60
           msg='Frame Rate set to 60'
       if key[K_7]:
           framerate=70
           msg='Frame Rate set to 70'
       if key[K_8]:
           framerate=80
           msg='Frame Rate set to 80'
       if key[K_9]:
           framerate=90
           msg='Frame Rate set to 90'
       if key[K_0]:
           framerate=100
           msg='Frame Rate set to 100'

       if key[K_a]:
           pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
           f+=1
       for e in pygame.event.get():
           if e.type==QUIT:
               shutil.rmtree('anim')
               exit()
           if e.type==KEYDOWN:
               if e.key==K_s:
                   msg='Added Frame!'
                   pygame.image.save(draw, 'anim/frame'+str(f)+'.png')
                   f+=1
               if e.key==K_c:
                   draw.fill(bcol)
               if e.key==K_r:
                   name='anim'+str(randrange(0,999))+str(randrange(0,999))+'.avi'
                   msg='Rendering: '+name
                   pygame.display.set_caption('Anim8 - Sam Tubb - '+'Frame: '+str(f)+' '+str(msg))
                   subprocess.call('ffmpeg -f image2 -s 640x480 -i anim/frame%01d.png -r '+str(framerate)+' '+name,shell=True)
                   msg='Done!'
               if e.key==K_p:
                   subprocess.call('ffplay '+name,shell=True)
           if e.type==MOUSEBUTTONDOWN:
               if e.button==1:
                   try:
                       prevcol=color
                       newcol=gui.get_at(mse)
                       if newcol==(50,50,50):
                           newcol=prevcol
                       color=newcol
                   except:
                       pass
               if e.button==3:
                   try:
                       prevcol=bcol
                       newcol=gui.get_at(mse)
                       if newcol==(50,50,50):
                           newcol=prevcol
                       draw.fill(newcol)
                       bcol=newcol
                   except:
                       pass
               if e.button==4:
                   size+=1
                   if size>7:
                       size=7
               if e.button==5:
                   size-=1
                   if size==0:
                       size=1
           if e.type == pygame.MOUSEMOTION:
               lineEnd = pygame.mouse.get_pos()
               lineEnd = (lineEnd[0],lineEnd[1]-40)
               if pygame.mouse.get_pressed() == (1, 0, 0):
                       pygame.draw.line(draw, color, lineStart, lineEnd, size)
               lineStart = lineEnd

       pygame.display.flip()

    Oh, and on another note, just if anyone was curious, here is what the output looks like.. I made a little new year's animation :

    Animation Test

  • New cookie behaviour in browsers may cause regressions

    24 février 2020, par Matomo Core Team — Community, Development

    Last year the Chromium browser team announced they would change their default behaviour for cookies. In particular about a property called samesite. Over the last few months, we have made various changes to our cookie handling to get Matomo ready for this. Depending on your setup and the features you use, some things may not work anymore.

    You can avoid most of the issues by using HTTPS on your Matomo, and ideally also use HTTPS on your website(s).

    If you are not running the latest version of Matomo yet (3.13.3 at the time of writing), then we highly recommend that you upgrade as soon as possible. Previous versions are not compatible with these cookie browser changes.

    Opt out screen

    If you embed the opt out screen on your website running on HTTP, there is a chance the Matomo opt out no longer works. In these cases it may still work over http:

    • when the privacy policy page that embeds the opt out screen (via iframe) also has the Matomo JavaScript tracker embedded,
    • and when both the opt out and the JS tracker point to the same Matomo installation.

    In other cases when HTTP is used, the opt out feature will likely be broken.

    We recommend you test whether the opt out on your site still works by opening your privacy policy page in an incognito browser window. Then test to opt out of tracking, and then reload the page. If the checkbox “You are not opted out. Uncheck this box to opt out.” is still ticked, then your opt out is not working.

    If the opt out is not working anymore, it is most likely due to HTTP being used. In that case you should change the opt out URL to HTTPS. For example change from &lt;iframe src=”<strong>http://</strong>…” to &lt;iframe src=”<strong>https://</strong>...” . If your Matomo doesn’t support HTTPS yet, you will need to contact your webhoster or system administrator to get SSL enabled on your Matomo domain.

    JavaScript tracker

    In most cases, everything related to the JavaScript Tracker will still work as expected.

    But there is an edge case : when you are also reading Matomo’s cookie server side. You may be affected by this edge case issue when :

    • you track part of the user behaviour in the browser (using Matomo JS Tracker),
    • and also track user behavior in your server (for example using one of Matomo SDKs in PHP, Java, Python, C#, etc.).

    In that case, for you to still be able to read the so-called visitorId on your server, we recommend you add this line to your JS tracking code :

    _paq.push([‘setSecureCookie’, location.protocol === 'https:']);

    The cookie can be only retrieved if your website is loaded through HTTPS.

    Should you have any questions, or notice anything isn’t working as expected, please visit our forum.

    Third party cookies

    If you are using third party cookies, using HTTPS on your Matomo is now a requirement to make them work across different domains. Otherwise Chrome and in the near future other browsers would not accept the cookie. If you don’t know if you are using third party cookies or first party cookies, you’re likely using first party cookies and this does not affect you.