Fixing the camera 3

Changed it
pull/1/head
Julius Riegel 7 years ago
parent b8b439c460
commit 1164a587ac

@ -42,7 +42,7 @@
<entry file="file://$PROJECT_DIR$/lib/graphiclib.py"> <entry file="file://$PROJECT_DIR$/lib/graphiclib.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474"> <state relative-caret-position="474">
<caret line="86" column="90" lean-forward="false" selection-start-line="86" selection-start-column="90" selection-end-line="86" selection-end-column="90" /> <caret line="86" column="59" lean-forward="true" selection-start-line="86" selection-start-column="59" selection-end-line="86" selection-end-column="59" />
<folding> <folding>
<element signature="e#0#28#0" expanded="true" /> <element signature="e#0#28#0" expanded="true" />
</folding> </folding>
@ -494,7 +494,7 @@
<entry file="file://$PROJECT_DIR$/lib/graphiclib.py"> <entry file="file://$PROJECT_DIR$/lib/graphiclib.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474"> <state relative-caret-position="474">
<caret line="86" column="90" lean-forward="false" selection-start-line="86" selection-start-column="90" selection-end-line="86" selection-end-column="90" /> <caret line="86" column="59" lean-forward="true" selection-start-line="86" selection-start-column="59" selection-end-line="86" selection-end-column="59" />
<folding> <folding>
<element signature="e#0#28#0" expanded="true" /> <element signature="e#0#28#0" expanded="true" />
</folding> </folding>

@ -84,4 +84,5 @@ class PiCamera(pygame.sprite.Sprite):
print('updating camera') print('updating camera')
with picamera.array.PiRGBArray(self.camera, size=self.size) as output: with picamera.array.PiRGBArray(self.camera, size=self.size) as output:
self.camera.capture(output, 'rgb', resize=self.size) self.camera.capture(output, 'rgb', resize=self.size)
print('Captured %dx%d image' % (output.array.shape[1], output.array.shape[0])) s = pygame.surfarray.make_surface(output.array)
self.image.blit(s, (0, 0))
Loading…
Cancel
Save