PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 25 → WX - Tirar uma foto pelo aplicativo
WX - Tirar uma foto pelo aplicativo
Iniciado por BOLLER, 19,oct. 2017 15:40 - No hay respuesta
Miembro registrado
3.651 mensajes
Popularité : +175 (223 votes)
Publicado el 19,octubre 2017 - 15:40




// 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)


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/