PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WX - Tirando foto com celular e usando como Avatar
WX - Tirando foto com celular e usando como Avatar
Started by BOLLER, Sep., 29 2017 10:01 PM - No answer
Connect yourself…
BOLLER
#1
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on September, 29 2017 - 10:01 PM
// Summary: <specify the procedure action>
// Syntax:
// TirarFoto ()
//
// Parameters:
//
None
// Return Value:
//
None
//
// For instance:
// Indicate an example.
//
Procedure
TirarFoto
(
)
//1 : Sim
//2 : Não
SWITCH
Dialog
(
"Deseja tirar uma nova foto?"
)
// Sim
CASE
1
s
Foto
is string
s
Foto
=
VideoStartApp
(
viPictureCapture
)
IF
s
Foto
<
>
""
THEN
IMG_
Foto
=
s
Foto
t001_usuarios.t001_avatar_Img
=
IMG_
Foto
//1 : Sim
//2 : Não
SWITCH
Dialog
(
"Deseja girar a foto?"
)
// Sim
CASE
1
//1 : Sentido Horário
//2 : Sentido Anti-Horário
SWITCH
Dialog
(
"Qual sentido devo girar a foto?"
)
// Sentido Horário
CASE
1
dRotation
(
IMG_
Foto
,
90
)
// Sentido Anti-Horário
CASE
2
dRotation
(
IMG_
Foto
,
-
90
)
END
// Não
CASE
2
END
END
// Não
CASE
2
//1 : Sim
//2 : Não
SWITCH
Dialog
(
"Deseja usar uma foto da galeria de fotos?"
)
// Sim
CASE
1
// select an image in the gallery
s
ImagePath
is string
=
AlbumPicker
(
albumImage
)
IF
s
ImagePath
<
>
""
THEN
{
IMG_
Foto
..
FileLink
,
indItem
}
=
fLoadBuffer
(
s
ImagePath
)
IMG_
Foto
=
{
IMG_
Foto
..
FileLink
,
indItem
}
t001_usuarios.t001_avatar_Img
=
IMG_
Foto
END
// Não
CASE
2
END
END
//save jpg
buf
Imagem
is
Buffer
=
dLoadImage
(
IMG_
Foto
,
imgDefault
,
97
,
77
)
fSaveBuffer
(
"foto.jpg"
,
buf
Imagem
)
ToastDisplay
(
"Imagem atualizada com sucesso"
)
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text