PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → WX - Avatar Save Jpg Proporcional
WX - Avatar Save Jpg Proporcional
Débuté par BOLLER, 02 nov. 2017 15:52 - Aucune réponse
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 02 novembre 2017 - 15:52
// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] SaveJpg (<Imagem> is Image)
//
// Parameters:
// Imagem (Image): <specify the role of Imagem>
// Return Value:
// Image: // None
//
// For instance:
// Indicate an example.
//
Procedure SaveJpg(Imagem is Image)

ratioX is real = 130 / Imagem..Width
ratioY is real = 130 / Imagem..Height
IF ratioY < ratioX THEN
dResize(Imagem, 130, RoundUp(Imagem..Height * ratioX))
ELSE
dResize(Imagem, RoundUp(Imagem..Width * ratioY), 130)
END
dSaveImageJPEG(Imagem,"foto.jpg",100)

RESULT(Imagem)


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