Allerdings gibt man dort ja einen Pfad an. Ich habe in anderen Programmen gesehen das man auch das Bild als "Code" direkt in die Python Datei einbinden kann, so bräuchte ich dann kein Zusätzliches Bild im selben Ordner meiner Datei liegen haben.
Code: Alles auswählen
class MySplashScreen(wx.SplashScreen):
"""
Create a splash screen widget.
"""
def __init__(self, parent=None):
aBitmap = wx.Image(name = "bild.jpg").ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
splashDuration = 5000 # milliseconds
wx.SplashScreen.__init__(self, aBitmap, splashStyle,
splashDuration, parent)
wx.Yield()
Ich weiß leider nicht wie das genau heißt, sowas hier meine ich:
Code: Alles auswählen
def bildTest():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0f\x08\x06\
\x00\x00\x00\xedsO/\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x01\xb0IDAT(\x91\x9d\x93AK\x1bQ\x10\xc7\x7f\xef\xa5\x17o\xee\xc1\xb8\xf4"\
\x98\xc6\xf4\xa6T<$\xa5\xde\xfc\x00\xb6\xd2J\x14$mO5\x82\xe0\x07\xf0\x13x\
\x10M\n\x1aP\x90\xe6 \x08\xa2&\x88\xc1`\x0f\xdd\xb8\xb4YvK[Z\xb6Y\xf1\xa6\'\
\xc9\xa1W_O\xbb\xecjZ\xc4\x81\xc7\xf0f\xfe\xf3\x9b\x99\x07\x0f!c\xf8\'?7\xaf\
\xde\xafo\xaap,\x9cs]\xf7VN\x12\xb2\xb8\x94|\xffj\xe38\x8e\n\xc7?\x19\r\x050\
\x90z,\xb8a\x11\xc0\xe2\xca\xb2\x88K\xc9\xdaZ)"*\x7f(\xdf\xac\xeb\x0c\xf0-\
\x95JR\xab\xd5\x14@\xb5RQ\x00\xaf&\'\xef\x06X\\Y\x16Wn\x8b\xdd\xdd=<\xefLU\
\xaa\x87\x00\x8c>{zk|\x80\x07\x9d\x82Z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