PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WX - Tirando foto com celular e usando como Avatar
WX - Tirando foto com celular e usando como Avatar
Iniciado por BOLLER, set., 29 2017 10:01 PM - Sem resposta
Membro registado
3.651 mensagems
Popularité : +175 (223 votes)
Publicado em setembro, 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

sFoto is string
sFoto = VideoStartApp(viPictureCapture)
IF sFoto <> "" THEN
IMG_Foto = sFoto
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
sImagePath is string=AlbumPicker(albumImage)
IF sImagePath<>"" THEN
{IMG_Foto..FileLink,indItem}=fLoadBuffer(sImagePath)
IMG_Foto={IMG_Foto..FileLink,indItem}
t001_usuarios.t001_avatar_Img = IMG_Foto
END
// Não
CASE 2

END

END

//save jpg
bufImagem is Buffer = dLoadImage(IMG_Foto,imgDefault,97,77)

fSaveBuffer("foto.jpg",bufImagem)

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/