PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Help : Photo qui apparaît avec une rotation de 90°
Help : Photo qui apparaît avec une rotation de 90°
Started by Baptiste, Jan., 15 2020 5:06 PM - 5 replies
Connect yourself…
Baptiste
#1
Posted on January, 15 2020 - 5:06 PM
Bonjour,
Lorsque je prends une photo en mode portrait avec mon téléphone Galaxy S7 Edge puis que j'importe cette image dans mon application Android Windev mobile, la photo apparaît mais avec une rotation de 90°
J'en conclus que Windev mobile 24 ne gère pas les paramètres Exif.
Mais comment puis savoir si je dois corriger la photo ou non ?
En effet, en windev mobile ne comprends pas ImageInfoValeur, donc comment puis-je connaitre l'orientation de la photo et corriger cette dernière en lui appliquant une rotation
En webdev j'utilisait ceci
nOrientation is int =ImageInfoValeur(Fichier, imgOrientation)
IF nOrientation>1 THEN
....
MAis en windev mobile je n'ai pas d'équivalent
Report
0
0
stef1811
#2
Registered member
476 messages
Popularité : +20 (20 votes)
Posted on January, 17 2020 - 2:53 PM
oui pas équivalent en WM mais faisable avec une fonction en java
Report
0
0
stefkpl
#3
Registered member
78 messages
Popularité : +1 (1 vote)
Posted on January, 27 2020 - 5:24 PM
Trouvé dans le forum
https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/23046-donnees-exif-android/read.awp
Amicalement
--
---------
De retour en dev windev : de webdev 12 à windev mobile 23 outch !!!
Report
0
0
lolodev
#4
Posted on April, 16 2020 - 3:14 PM
WDM25
bonjour
je suis confronté à ce soucis...
entre un huawei et un samsung
la meme application, meme vue, avec samsung l'image est tournée de 90°
pourquoi ?
comment eviter ?
merci
Report
0
0
lolodev
#5
Posted on April, 16 2020 - 3:35 PM
j'ai coché la case dans DETAIL
"Orienter selon les données Exif de l'image"
mais photo est toujours tournée de 90°
...
Report
0
0
Laurent CARRON
#6
Registered member
1 message
Posted on April, 24 2020 - 10:44 AM
Bonjour
j'ai eu le même souci, je m'en suis sorti avec un code JS
Appel de la fonction en JS :
SELON exifRotation(sPhoto)
CAS "90": Résultat1 =dRotation(MonImage, 90)
CAS "180": Résultat1 =dRotation(MonImage, 180)
CAS "270": Résultat1 =dRotation(MonImage, 270)
FIN
Fonction JS exifRotation :
import android.media.ExifInterface;
import java.io.IOException;
public static int exifRotation(String filepath) {
int rotation = 0;
try
{
ExifInterface exifInterface = new ExifInterface(filepath);
int exifRotationInt = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED);
if(exifRotationInt != ExifInterface.ORIENTATION_UNDEFINED)
{
switch(exifRotationInt)
{
case ExifInterface.ORIENTATION_ROTATE_90 :
rotation = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180 :
rotation = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270 :
rotation = 270;
break;
}
}
}
catch(IOException e){}
return rotation;
}
J'espère que c'était cela le souci
Laurent
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
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