Fixing the camera 5

pull/1/head
Julius Riegel 7 years ago
parent 8a763c7591
commit 73e37c0c84

@ -41,8 +41,8 @@
<file leaf-file-name="graphiclib.py" pinned="false" current-in-tab="true"> <file leaf-file-name="graphiclib.py" pinned="false" current-in-tab="true">
<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="457"> <state relative-caret-position="474">
<caret line="85" column="30" lean-forward="false" selection-start-line="85" selection-start-column="30" selection-end-line="85" selection-end-column="30" /> <caret line="86" column="64" lean-forward="false" selection-start-line="86" selection-start-column="64" selection-end-line="86" selection-end-column="64" />
<folding> <folding>
<element signature="e#0#28#0" expanded="true" /> <element signature="e#0#28#0" expanded="true" />
</folding> </folding>
@ -493,8 +493,8 @@
</entry> </entry>
<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="457"> <state relative-caret-position="474">
<caret line="85" column="30" lean-forward="false" selection-start-line="85" selection-start-column="30" selection-end-line="85" selection-end-column="30" /> <caret line="86" column="64" lean-forward="false" selection-start-line="86" selection-start-column="64" selection-end-line="86" selection-end-column="64" />
<folding> <folding>
<element signature="e#0#28#0" expanded="true" /> <element signature="e#0#28#0" expanded="true" />
</folding> </folding>

@ -84,6 +84,6 @@ class PiCamera(pygame.sprite.Sprite):
def update(self, *args): def update(self, *args):
print('updating camera') print('updating camera')
self.output.truncate(0) self.output.truncate(0)
self.camera.capture(self.output, 'rgb') self.camera.capture(self.output, 'rgb', resize=self.size)
s = pygame.transform.rotate(pygame.surfarray.make_surface(self.output.array), 90) s = pygame.transform.rotate(pygame.surfarray.make_surface(self.output.array), 90)
self.image.blit(s, (0, 0)) self.image.blit(s, (0, 0))
Loading…
Cancel
Save