IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB 6 et antérieur Discussion :

Date fichier image


Sujet :

VB 6 et antérieur

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Retraité
    Inscrit en
    Août 2005
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ain (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Août 2005
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Date fichier image
    Bonjour, comment récupérer la date d'une photo (fichier JPG) pour gérer des photos à partir d'Excel? J'arrive à récupérer la date de création ou de dernière mise à jour du fichier mais pas la date et l'heure de la prise de photo, pourtant dans Ulead je la vois apparaître.
    Merci de votre aide

  2. #2
    New
    New est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    39
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2003
    Messages : 39
    Points : 43
    Points
    43
    Par défaut
    Hmm ces infos se trouvent dans le fichier JPEG mais ou exactement c'est une autre question (probablement au début du fichier).

    J'ai ce lien : http://www.exif.org/specifications.html

    Exif c'est une sorte de structure de donnéess pouvant être inclue dans le fichier JPEG et utilisée par les appareils photos numériques pour stocker pas mal d'infos dont notamment la date de prise de la photo.

    J'ai été interresé un moment à chercher celà pour un de mes programmes mais faute de temps (faut "étudier" la structure d'un Jpeg), j'ai utilisé la date de dernière mise à jour.

  3. #3
    Modérateur
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 077
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 077
    Points : 17 177
    Points
    17 177
    Par défaut
    un petit utilitaire contenant la fonction que tu recherches

    1 CommandButton
    1 ListBox
    1 Label
    1 CommonDialog

    Pour le List1 la police est en Courier New taille 8

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    Option Explicit
    Dim Chemin, Fichier, Resultat As String
    Dim NamIndx(34) As String
    Dim T, U As Byte
    Dim LargMin, HautMin As Integer
     
    Private Sub Form_Resize()
    If Me.WindowState <> vbMinimized Then
     If Me.WindowState = vbNormal Then
      If Me.Height < 1035 Then Me.Height = 1035
      If Me.Width < 2670 Then Me.Width = 2670
     End If
     List1.Height = (Me.Height - List1.Top) - (List1.Left * 8)
     List1.Width = Me.Width - (List1.Left * 4)
    End If
    End Sub
     
    Private Sub Form_Load()
    NamIndx(0) = "Name": NamIndx(1) = "Size": NamIndx(2) = "Type"
    NamIndx(3) = "Date Modified": NamIndx(4) = "Date Created": NamIndx(5) = "Date Accessed"
    NamIndx(6) = "Attributes": NamIndx(7) = "Status": NamIndx(8) = "Owner"
    NamIndx(9) = "Author": NamIndx(10) = "Title": NamIndx(11) = "Subject"
    NamIndx(12) = "Category": NamIndx(13) = "Pages": NamIndx(14) = "Comments"
    NamIndx(15) = "Copyright": NamIndx(16) = "Artist": NamIndx(17) = "Album Title"
    NamIndx(18) = "Year": NamIndx(19) = "Track Number": NamIndx(20) = "Genre"
    NamIndx(21) = "Duration": NamIndx(22) = "Bit Rate": NamIndx(23) = "Protected"
    NamIndx(24) = "Camera Model": NamIndx(25) = "Date du cliché": NamIndx(26) = "Dimensions"
    NamIndx(27) = "Not used": NamIndx(28) = "Not used": NamIndx(29) = "Not used"
    NamIndx(30) = "Company": NamIndx(31) = "Description": NamIndx(32) = "File Version"
    NamIndx(33) = "Product Name": NamIndx(34) = "Product Version"
    U = 0
    For T = 0 To 34
     If Len(NamIndx(T)) > U Then U = Len(NamIndx(T))
    Next T
    U = U + 1
    For T = 0 To 34
     NamIndx(T) = NamIndx(T) & String$(U - Len(NamIndx(T)), " ") & ": "
     If T < 10 Then NamIndx(T) = " " & NamIndx(T)
    Next T
    List1.Clear
    End Sub
     
    Private Sub Command1_Click()
    CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly
    CommonDialog1.Flags = CommonDialog1.Flags + cdlOFNPathMustExist + cdlOFNExplorer
    CommonDialog1.CancelError = True
    On Error Resume Next
    CommonDialog1.ShowOpen
    If Err.Number <> 0 Then On Error GoTo 0: Exit Sub
    Fichier = CommonDialog1.FileTitle
    Chemin = Left$(CommonDialog1.FileName, Len(CommonDialog1.FileName) - Len(Fichier))
    informationsFichier
    LargMin = (LargMin + 1) * LabLargeFonte.Width
    HautMin = (240 * (List1.ListCount - 1))
    'redimenssionnes si besoin
    If List1.Height < HautMin Then
     List1.Height = HautMin
     Me.Height = List1.Height + List1.Top + (List1.Left * 8)
    End If
    If List1.Width < LargMin Then
     List1.Width = LargMin
     Me.Width = LargMin + (List1.Left * 4)
    End If
    End Sub
     
    Public Sub informationsFichier()
    'recuperé sur ce forum pour avoir les infos que tu recherche
    'necessite d'activer reference Microsoft Shell Controls and Automation
     
    Dim objShell As Shell
    Dim objFolder As Folder
    Dim strFileName As FolderItem
     
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.NameSpace(Chemin) 'adapter le chemin
    Set strFileName = objFolder.Items.Item(Fichier) 'adapter le fichier
    List1.Clear: LargMin = 0
    For T = 0 To 34
     If objFolder.GetDetailsOf(strFileName, T) <> "" Then
      List1.AddItem CStr(T) & " " & NamIndx(T) & Trim$(objFolder.GetDetailsOf(strFileName, T))
      If LargMin < Len(List1.List(List1.NewIndex)) Then LargMin = Len(List1.List(List1.NewIndex))
     End If
    Next
    Set objShell = Nothing: Set objFolder = Nothing: Set strFileName = Nothing
    End Sub
    salut
    Soyez sympa, pensez -y
    Balises[CODE]...[/CODE]
    Balises[CODE=NomDuLangage]...[/CODE] quand vous mettez du code d'un autre langage que celui du forum ou vous postez.
    Balises[C]...[/C] code intégré dans une phrase.
    Balises[C=NomDuLangage]...[/C] code intégré dans une phrase quand vous mettez du code d'un autre langage que celui du forum ou vous postez.
    Le bouton en fin de discussion, quand vous avez obtenu l'aide attendue.
    ......... et pourquoi pas, pour remercier, un pour celui/ceux qui vous ont dépannés.
    👉 → → Ma page perso sur DVP ← ← 👈

Discussions similaires

  1. intégrer un fichier image dans une base de donnée?
    Par Lody dans le forum Requêtes
    Réponses: 9
    Dernier message: 16/03/2006, 19h08
  2. probleme de date fichier ftp
    Par eomer212 dans le forum MFC
    Réponses: 5
    Dernier message: 30/09/2005, 10h23
  3. ouverture s un fichier image
    Par harris_macken dans le forum Autres Logiciels
    Réponses: 1
    Dernier message: 21/09/2005, 07h33
  4. Imprimer fichiers images en ligne de commande
    Par naholyr dans le forum Scripts/Batch
    Réponses: 4
    Dernier message: 02/09/2004, 18h11
  5. Comment lire un fichier image
    Par Charlemagne dans le forum DirectX
    Réponses: 9
    Dernier message: 12/03/2004, 00h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo