Skip to content

Commit a3db12f

Browse files
Fix image resolution setting
1 parent ef06b58 commit a3db12f

File tree

1 file changed

+1
-4
lines changed
  • internal_filesystem/apps/com.micropythonos.camera/assets

1 file changed

+1
-4
lines changed

internal_filesystem/apps/com.micropythonos.camera/assets/camera_app.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,7 @@ def set_image_size(self):
190190
disp = lv.display_get_default()
191191
target_h = disp.get_vertical_resolution()
192192
#target_w = disp.get_horizontal_resolution() - self.button_width - 5 # leave 5px for border
193-
target_w = target_h # leave 5px for border
194-
if target_w == self.width and target_h == self.height:
195-
print("Target width and height are the same as native image, no scaling required.")
196-
return
193+
target_w = target_h # square
197194
print(f"scaling to size: {target_w}x{target_h}")
198195
scale_factor_w = round(target_w * 256 / self.width)
199196
scale_factor_h = round(target_h * 256 / self.height)

0 commit comments

Comments
 (0)