Ejemplo n.º 1
0
def showtime():

  text = time.strftime('%I:%M:%S%p')
  timeimg = cv2.putText(blankimg, text, (x,y), cv2.FONT_HERSHEY_DUPLEX, fontsize, tuple((0,255,0)), 7)
  
  loadimg=transfunction.cv(blankimg, w, h, xc, yc)

  screen.blit(loadimg,(0,0))
  pygame.display.update()

  blankimg[:] = tuple((0,0,0))
Ejemplo n.º 2
0
w = screenres.width
h = screenres.height

img = sys.argv[1]

xc = float(sys.argv[2])
yc = float(sys.argv[3])

opencvimg = cv2.imread(img)

b,g,r = cv2.split(opencvimg)
colorimg = cv2.merge([r,g,b])

resizeimg = cv2.resize(colorimg, (w,h))

loadimg = transfunction.cv(resizeimg, w, h, xc, yc) 

pygame.init()
screen = pygame.display.set_mode((w,h))

screen.blit(loadimg,(0,0))
pygame.display.update()

while True:
  for event in pygame.event.get():
    if event.type == pygame.KEYDOWN:
      if event.key == pygame.K_q:
        sys.exit()

Ejemplo n.º 3
0
from screenres import screenres

w = screenres.width
h = screenres.height

img = sys.argv[1]

xc = float(sys.argv[2])
yc = float(sys.argv[3])

opencvimg = cv2.imread(img)

b, g, r = cv2.split(opencvimg)
colorimg = cv2.merge([r, g, b])

resizeimg = cv2.resize(colorimg, (w, h))

loadimg = transfunction.cv(resizeimg, w, h, xc, yc)

pygame.init()
screen = pygame.display.set_mode((w, h))

screen.blit(loadimg, (0, 0))
pygame.display.update()

while True:
    for event in pygame.event.get():
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_q:
                sys.exit()