FeD:Projekte/deadpixel

Aus Förderverein euregionale Digitalkultur e.V.

< FeD:Projekte(Weitergeleitet von FeD:Projekte/Deadpixel)
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

WARNING

Dieses Programm kann nicht nur Dein Gehirn frittieren sondern auch Dein Display. Epileptiker, LAUFT SCHNELL WEG!

Ich übernehme keinerlei Haftung für Schäden, Nutzen oder Sonstige Dinge die aus der Nutzung dieses wahnsinnigen Programms resultieren. Solltest Du damit einen Stuck Pixel repariert bekommen: Herzlichen Glühstrumpf!

Installation

Den Batzen unten einfach in eine Datei namens "deadpixel.py" reinkopieren.

Benötigt wird Python. Version ziemlich egal. Und pygtk mindestens version 2.0. Da bin ich mir aber auch nicht sicher. Who cares.

Un*x

Einfach ausführbar machen

chmod 755 deadpixel.py

und starten

./deadpixel.py

Windows

Geh sterben. Nein, ehrlich: Ich weiß auch nicht wie das geht. Müsste eigentlich genauso funktionieren. Evtl. das script mit dem Python-Interpreter starten. Viel Glück, armer Irrer.

Sonstiges

Äh, keine Ahnung. Das ist zu doof, um es irgendwo anders laufen zu lassen. GTK gibts eh kaum woanders.

Bedienung

  • Nach Start bekommt man ein fesches GRÜNES Fenster. Bei nem Linksclick wechselt es durch die Grundfarben. Da kann man natürlich in der Liste noch mehr eintragen, macht aber höchstens als Foltermaschine Sinn, nicht zum pixel reparieren. Damit kann man schonmal sehen, ob es Pixelfehler gibt.
  • Mit der rechten Maustaste kann man (NOCH!) das Programm beenden.
  • Mit der mittleren Maustaste GEHTS RUND!! Das Programm versucht so schnell wie möglich die Farben durchzurotieren. Mit Vollbildfenster auf nem 26" wird man ziemlich schnell RAMDÖSIG davon! ICH RATE NOCH EINMAL DAVON AB DAS AUSZUPROBIEREN! ES WIRD DAS GEHIRN UND DANACH DISPLAY ZERSCHROTTEN! Wenn man aber einen stecken gebliebenen pixel gefunden hat, kann man versuchen das fenster auf diesen Bereich zu beschränken und dann MAXIMAL 5-10 Minuten lang diesen Pixel durchschalten, mit etwas Glück und vielleicht einer vorsichtigen Pixelmassage bekommt man den wieder zum laufen ;)

Code

deadpixel.py

#!/usr/bin/python
 
# WARNING! THIS PROGRAM IS DANGEROUS! IT CAN FRY YOUR BRAIN AND DISPLAY!
# USE ON YOUR OWN RISK! DO NOT FUCKING POINT ANY STUPID LAWYER AT ME!THX
 
# DO NOT TRY THIS AT HOME, KIDS!
 
__license__ = """
# DeadPixel (C)left 2009, riot@fedev.eu
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Placce, Suite 330, Boston, MA  02111-1307  USA
#
# And don't you point any lawyers at me!
# Send me a postcard, if you like this software.
#\n
"""
 
__usage__= """Usage: deadpixel [NOOPTIONS]
 
    Has no options yet. Ha ha!
 
Please report bugs to <deadpixel.riot@fedev.eu>"""
# Oh, and it doesn't have any argument parser, so this __usage__ is useless.
# But don't tell anyone.
 
import pygtk
import gtk
pygtk.require('2.0')
import sys
from time import sleep
 
class DeadPixel:
    def destroy(self, widget, data=None):
        gobject.source_remove(self.reader)
        gtk.main_quit()
 
    def foo(self, w, e):
        if e.button == 1:
            if self.color < 2:
                self.color += 1
            else: self.color = 0
            self.disp.modify_bg(gtk.STATE_NORMAL, self.colors[self.color])
        elif e.button == 2:
            # this makes your head SPIN. CAREFUL! Can destroy your display AND brain.
            # NOT suitable for epileptics!!!!
            while 1:
                if self.color < len(self.colors)-1:
                    self.color += 1
                else: self.color = 0
                self.disp.modify_bg(gtk.STATE_NORMAL, self.colors[self.color])
#                sleep(0.0005)
                while gtk.events_pending():
                    gtk.main_iteration_do(False)
        elif e.button == 3:
            gtk.main_quit()
 
 
 
 
    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.color = 1
        self.colors = [gtk.gdk.Color(65535,0,0), gtk.gdk.Color(0,65535,0), gtk.gdk.Color(0,0,65535)]
 
        self.window.connect("destroy", self.destroy)
 
 
        self.disp = gtk.EventBox()  
        self.disp.set_size_request(2000,1500)
 
        self.disp.set_events(gtk.gdk.BUTTON_PRESS_MASK)
        self.disp.connect("button_press_event", lambda w,e: self.foo(w,e))
 
        self.window.add(self.disp)
 
        self.disp.show()
        self.window.show()
 
        color = gtk.gdk.Color(0,65535,0)
        self.disp.modify_bg(gtk.STATE_NORMAL, color)
 
    def main(self):
        gtk.main()
 
if __name__ == "__main__":
    deadpixel = DeadPixel()
    deadpixel.main()
 
# END of shoddy code.