Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Mar 3, 2012

Webpage screenshot

PyWebShot - Command line webpage screenshot and thubnail generator

Mar 1, 2012

Image drawing

pyProcessing - built upon OpenGL and Pyglet, which provide the actual graphics rendering. Since these are multiplatform, so ispyprocessing.

Jan 20, 2012

Django Imagekit processing the original image

from django.db import models
from imagekit.models import ImageSpec
from imagekit.processors import resize, Adjust

class Photo(models.Model):
    original_image = models.ImageField(upload_to='photos')
    thumbnail = ImageSpec([resize.Fit(50, 50)], image_field='original_image',
            format='JPEG', options={'quality': 90})

Nov 1, 2011

Images processing apps

django-imagekit
from django.db import models
from imagekit.models import ImageSpec
from imagekit.processors import resize, Adjust

class Photo(models.Model):
    original_image = models.ImageField(upload_to='photos')
    thumbnail = ImageSpec([Adjust(contrast=1.2, sharpness=1.1),
            resize.Crop(50, 50)], image_field='original_image',
            format='JPEG', quality=90)

Jun 20, 2011

Media

Videos

ffmpeg -i input.mpg -ar 22050 -ab 64 -f flv -s 320x240 -r 29.970 -b 1000k -y output.flv

-ar -- is the Audio sample rate ie, 11050, 22050, 44144, and 48000
-ab -- is the Audio Bitrate ie, 64Kbits, 128Kbits, 384Kbtis, etc.
-r ---- is the Frame Rate or fps of the finished video, ie 24, 25, 29.970 etc.
-b ---- is the Bitrate you want to set the flv video to ie, 360k, 1000k etc.

# better
mencoder input.mpeg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -vf scale=360:240 -o output.avi

# worse
ffmpeg -i input.avi -b 1000 -s 640x480 -vcodec mpeg4 -r 30000/1001 output.avi

# or
ffmpeg -i M2U00009.MPG  -ar 44100 -ab 128k -s 720:480 -padtop 46 -padbottom 50 -padcolor 000000 -ss 00:00:40 -t 00:02:55  -f mp4 grok3.avi

# for android
https://help.ubuntu.com/community/AndroidVideoEncoding

Images

convert -resize '320x240!' 002.jpg thmb_002.jpg

Screenshot

sudo apt-get install scrot
scrot
# or
sleep 10 && scrot
# or
scrot -e 'mv $f /your/pictures'