• Slidy
  • Écrire le design:Bitmap

    De Ustensile
    Aller à : navigation, rechercher

    Pixels can be square, hexagonal, rectangular, or irregularly shaped, but given that each pixel has boundaries they require a process by which the world is chopped up into chunks that conform to those boundaries and is still visually meaningful. Discretization is part of the process by which color and light values are allocated to a pixel. It consists of sorting values, evaluating a cut-point where a value changes or merges, and setting the intervals between samples and value setting. Each of these stages require algorithms that shape the resulting pictures, and the speed of their processing.[1]


    Len(n)a

    Lena Soderberg Sjööblom Lena.gif Pixels.jpeg

    http://www.cs.cmu.edu/~chuck/lennapg/

    Jamie Allen, Killing Lena (2007): http://player.vimeo.com/video/12136645

    Animated gifs

    GIF = Graphics Interchange Format (littéralement « format d'échange d'images ») http://fr.wikipedia.org/wiki/Graphics_Interchange_Format

    Cloud.gif

    Born in 1987: The Animated GIF http://joyofgif.tumblr.com/

    Olia Lialina, Summer (2013) http://art.teleportacia.org/olia/summer/

    Imagemagick

    "ImageMagick started with a request from my DuPont supervisor, Dr. David Pensak, to display computer-generated images on a monitor only capable of showing 256 unique colors simultaneously. In 1987, monitors that could display 24-bit true color images were rare and quite expensive. There were a plethora of chemists and biologists at DuPont, but very were few computer scientists to confer with. Instead, I turned to Usenet for help, and posted a request for an algorithm to reduce 24-bit images to 256 colors."

    • convert: create/modify an image and save as a new file
    • mogrify: makes changes to an image "in-place" (replacing the original -- use with caution!)
    • montage: automated "poster" maker that creates a "thumbnail" image of a number of images (in a grid with variable spacing and options like showing the filename)
    • identify: display information about an image
    • display: show an image in a window (may not work on OS X, use the "open" command instead)

    Official notes pour installer imagemagick sur OSX: http://imagemagick.org/script/binary-releases.php#macosx

    Notes d'installation BAC1: http://fs.pad.constantvzw.org/public_pad/ImageMagickOSX

    Animation

    Commencer avec des images libres

    Licenses: Public domain, Creative Commons CC BY-SA, Licence Art Libre ...: http://freedomdefined.org/Definition/Fr

    • la liberté d'utiliser l'image et de jouir des avantages à en user
    • la liberté d'étudier l'image et de mettre en œuvre le savoir que l'on en tire
    • la liberté de faire et de redistribuer des copies, de l'ensemble ou d'une partie de l'information ou de l'expression
    • la liberté de modifier ou d'améliorer, et de distribuer les images dérivées

    Liens:

    Start with downloading a collection of > 15 images

    Conversion d'images

    Modifying images "in-place" (ATTENTION: changing the originals):

    $ mogrify -resize 100x100 original/*.jpg
    

    Create new images, conversion de .png en .jpg. Adding %03d generates automatic image names (001.png, 002.png, 003.png ...):

    $ mkdir small
    $ convert original/*.png -resize 100x100 small/%03d.jpg
    

    Créez vos ingrédients à partir de (presque) zéro

    Slicing images:

    Cutting an image up into tiles or strips. The crop command, when not given a specific position to cut out, will repeat as many times as it can, "cookie-cutter style", producing a series of images.

    $ mkdir cuts
    
    $ convert original/image.jpg -crop 64x64 cuts/tile%04d.png
    $ convert original/image.jpg -crop 64x cuts/strip%04d.png
    $ convert original/image.jpg -crop x64 cuts/bar%04d.png
    
    $ convert cuts/*.* animation_cuts.gif
    

    Explode a pdf and animate:

    $ mkdir pages
    
    $ convert original/lissitsky.pdf pages/page-%03d.jpg
    
    $ convert pages/*.* -delay 30 -loop 0 animation.gif
    

    Superposition d'images

    Use composite. Composite is both a command-line tool on its own, and also it's available via the "-composite" option of convert. Note that the order of things is different depending on which way you use.

    $ composite -gravity center imageA.png imageB.png imageAB.png
    $ composite -gravity top -blend 0 -negate imageA.png imageB.png imageAB.png
    

    http://www.imagemagick.org/script/composite.php

    Travailler avec du texte

    Pour VM ou Linux (les fonts/annotations apparemment ne marchent pas sur OSX)

    Superposer l'annotation sur l'animation:

    $ convert animation.gif -gravity center -fill red -annotate +1+1 "Hello" -fill white -annotate +0+0 "Hello" annotate_hello.gif
    $ convert animation.gif -gravity center -fill blue -annotate +1+1 "Monde" -fill white -annotate +0+0 "Monde" annotate_monde.gif
    $ convert *.gif animation_hellomonde.gif
    

    http://www.imagemagick.org/Usage/anim_mods/#annotating

    Using your own fonts; superposer l'annotation sur chaque image:

    $ convert original/*.jpg -gravity center -font  /home/fs/.fonts/SansGuiltWafer.otf -pointsize 76 -fill red -stroke white -annotate 0 'Bonjour' animation.gif
    

    Find fonts available on your system:

    $ convert -list font > fonts.txt
    

    Additional font effects: http://www.imagemagick.org/Usage/fonts

    Scripts

    Boucle

    Colouredlena.gif

    Dans le terminal:

    $ mkdir boucle
    

    Prepare un image en RGB (image.jpg, image.png) dans le dossier 'original'. Dans un editeur de texte, Copier/coller le script ci-dessous et enregistrez sous 'boucle.py':[2]

    <syntaxhighlight lang="bash">

    1. !/bin/bash

    for i in 0 25 50 75 100 125 150 175;

    do

       convert original/lena.jpg -define modulate:colorspace=LCHuv -modulate 100,100,$i boucle/$i.jpg
    

    done

    convert boucle/*.* animation_boucle.gif </syntaxhighlight>

    Dans le terminal:

    $ bash boucle.py
    

    http://www.imagemagick.org/Usage/color_mods/

    Increment

    Increment.gif

    Pour VM ou Linux (les fonts/annotations apparemment ne marchent pas sur OSX)

    Dans le terminal:

    $ mkdir count
    

    Dans un editeur de texte, Copier/coller le script ci-dessous et enregistrez sous 'count.sh':

    <syntaxhighlight lang="bash">

    1. !/bin/bash

    COUNTER=0 FONTSIZE=90

    for IMAGE in $(ls small); do let COUNTER=COUNTER+1 let FONTSIZE=FONTSIZE+10

    convert small/$IMAGE -gravity center -font /home/fs/.fonts/SansGuiltWafer.otf -pointsize $FONTSIZE -fill purple -stroke white -annotate 0 $COUNTER count/$IMAGE

    done

    convert steps/*.* animation_count.gif </syntaxhighlight>

    Resultats 13/03/2013

    pierre barick

    Foot.gif Animation cuts2.gif Accumu2pierre.gif Toytin.gif

    Remy

    Crabe.gif Smileyanimation.gif

    Pauline

    Animationpauline.gif

    1. Graham Harwood, Pixel in: Fuller, Matthew (2008). Software Studies: a lexicon. The MIT Press.
    2. Si tu as des problemes avec textedit et rtf: $ touch boucle.py