mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 10:31:34 -08:00
example 'camera`: add note about possible orientation issues; revision;
This commit is contained in:
parent
4c540d708c
commit
dd61e73fd1
2 changed files with 25 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
;;; This starts a local web-server in order to preview/download the taken
|
;;; This starts a local web-server in order to preview/download the taken
|
||||||
;;; pictures on your desktop computer. Make sure you are in the same WiFi,
|
;;; pictures (mobile device) on your desktop computer.
|
||||||
;;; and open:
|
;;;
|
||||||
|
;;; Make sure you are in the same WiFi, and open:
|
||||||
;;;
|
;;;
|
||||||
;;; http://192.168.1.x:1701/
|
;;; http://192.168.1.x:1701/
|
||||||
|
|
||||||
|
|
@ -14,7 +15,10 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style type=\"text/css\">
|
<style type=\"text/css\">
|
||||||
img { width: 150px; height: 150px; object-fit: contain; border-width: 10px; border-style: solid; border-color: white }
|
img {
|
||||||
|
width: 150px; height: 150px; object-fit: contain;
|
||||||
|
border-width: 10px; border-style: solid; border-color: white;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,23 @@ http://192.168.1.x:1701/
|
||||||
chosen here because it's both relatively small and works well on mobile.
|
chosen here because it's both relatively small and works well on mobile.
|
||||||
|
|
||||||
This example needs a small Qt extension for rotating images. That's necessary
|
This example needs a small Qt extension for rotating images. That's necessary
|
||||||
here because different devices may have different camera orientations, so the
|
here because different devices may have different orientation handling (namely
|
||||||
saved images would be displayed with the wrong orientation in the desktop
|
iOS), so the saved images would be displayed with the wrong orientation in the
|
||||||
browser.
|
desktop browser.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
|
||||||
|
While testing on different devices (phone/tablet), I discovered that they may
|
||||||
|
behave differently regarding the orientation (both video output and saved
|
||||||
|
images) even if running the same OS. So, to adapt to your device's behavior,
|
||||||
|
you need to play around with `autoOrientation` and the angles in function
|
||||||
|
`adaptOrientation()`; see also Lisp function `qt:rotate-image`.
|
||||||
|
|
||||||
|
The current settings worked for me on both an android phone and an iPhone (both
|
||||||
|
older models).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,7 +58,7 @@ lqml run.lisp
|
||||||
Optionally pass `-slime` to start a Swank server, and connect from Emacs with
|
Optionally pass `-slime` to start a Swank server, and connect from Emacs with
|
||||||
`M-x slime-connect`.
|
`M-x slime-connect`.
|
||||||
|
|
||||||
During development you can pass `-auto`, which will releoad all QML files after
|
During development you can pass `-auto`, which will reload all QML files after
|
||||||
you made a change to any of them and saved it. For re-initialization after
|
you made a change to any of them and saved it. For re-initialization after
|
||||||
reloading, file `lisp/qml-reload/on-reloaded` will be loaded.
|
reloading, file `lisp/qml-reload/on-reloaded` will be loaded.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue