1 votos

Dónde están los metadatos de las imágenes y álbumes de los datos almacenados en el iPhone? y cómo extraer?

Estoy tratando de conectar mi iPhone a través de iTunesMobileDevice.dll y otras bibliotecas proporcionadas por iTunes. Así que ahora soy capaz de alcanzar el sistema de archivos y copiar imágenes desde el iPhone. Sin embargo, las imágenes se almacenan en directorios titulado 101APPLE a 109APPLE y el sistema de ficheros se ve algo como esto:

...
/PhotoStreamsData/.MISC
/PhotoStreamsData/.MISC/Incoming
/DCIM
/DCIM/101APPLE
...
/DCIM/.MISC
/DCIM/.MISC/Timelapse
/DCIM/.MISC/Incoming
...
/PhotoData/Metadata
/PhotoData/Metadata/DCIM
/PhotoData/Metadata/DCIM/109APPLE
/PhotoData/Metadata/DCIM/108APPLE
/PhotoData/Metadata/DCIM/107APPLE
/PhotoData/Metadata/DCIM/106APPLE
/PhotoData/AlbumsMetadata
...

Ahora tengo que extraer los datos del Álbum así y reorganizar mis imágenes en los álbumes que he hecho en mi iPhone.

Mi pregunta es que donde los datos del álbum (y otros metadatos acerca de las imágenes como el tiempo, o ...) se almacena? y ¿cómo es posible extraer de ellos?

Información adicional para Aclarar Mi Pregunta:

Necesito información acerca de iOS Sistema de Archivos. Específicamente acerca de cómo y dónde iOS mantiene los datos acerca de los álbumes de fotos, es decir, que las fotos pertenecen a los álbumes? la fecha en la que se toman fotos, etc. Por último tengo que ser capaz de reorganizar las carpetas que están arriba en lo que podemos ver en la Galería de iPhone. algo como esto:

Photo Gallery:
- Album1:
    -IMG_001.JPG
    -IMG_002.JPG
    -IMG_003.JPG
- Album2:
    -IMG_002.JPG
    -IMG_004.JPG
    -IMG_005.JPG

2voto

Kerry Puntos 100

En este artículo, voy a responder a la pregunta sobre cómo examinar los metadatos de la foto con el exiftool.

No es el apple suministra sorbos de comandos. hombre bebe

$ sips -g format  /Users/mac/Desktop/rockSlab.JPG  
/Users/mac/Desktop/rockSlab.jpg
  format: jpeg

Doy un ejemplo de exiftool para su uso en un mac. El uso de exiftool en la línea de comandos de Windows será el mismo. He oído mucho acerca de exiftool. Escribí un applescript para utilizar esta herramienta. Usted podría utilizar cualquier idioma que te gusta.

Supongo que usted se conecta tu iPhone a un mac, pero algunos de los conceptos que deberían aplicarse. Applescript se supone debe ser legible para todos. Es en "inglés".

fyi:

(* *) 
  is a comment
-- 
  is a one line comment
set a to b 
  is a = b in normal languages
log
  is a print statement
display dialog
  put up a dialog box
common(dropped_items)
  means call function common with argument dropped_items
on common(input)
  is the function header

applescript app:

    (* 
  This script provides an example of using the command line ExifTool tool. 
  The script was written to answer ASC Discussion question https://discussions.apple.com/thread/8511361

   Shows exif data before and after any change.  You may run the script by either double clicking on the app or droping files on the app. I Included debugging statements on run path.

   Requires ExifTool by Phil Harvey.  Download
       https://www.sno.phy.queensu.ca/~phil/exiftool/

    You need to place exiftool in your default path.  I suggest "/usr/local/bin/exiftool". No you cannot go into terminal and alter your path.  
    You can alter this script to change the path.   

  Input: 
      Drop files on AppleScript icon.
      or
      double click on the app.
      or 
      run from the script editor to see the log output. You will fist need to click on the "list" icon at the bottom of the script editor screen.

  Output:  
      Creates file "tryAttachmentsLog.txt" in you home folder. 
      When run from the script editor, you get logged output.


  How to save: 
        Save as an Application Bundle.  Don't check the two boxes below.


For testing, run in the Script Editor.
    1) Click on the Event Log tab to see the output from the log statement
    2) Click on Run


Author: rccharles

 *)


-- Gets invoked here when you run in AppleScript editor.
-- This is for testing although you could use it for production
on run
    -- Write a message into the event log.
    log "  --- Starting on " & ((current date) as string) & " --- "

    set desktopPath to (path to desktop) as string
    log "desktopPath = " & desktopPath


    try
        set see to choose file
    on error errMsg number n
        -- Be sure to select a file on your DESKTOP.
        set see to alias (desktopPath & "rockSlab.jpg")
    end try

    -- Simulate dropped items list.
    set dropped_items to {see}

    common(dropped_items)

end run



-- Gets invoked here when something is dropped on this AppleScript icon
on open dropped_items
    display dialog "Number of items dropped is " & (count of dropped_items) & ". " giving up after 3

    common(dropped_items)

    --display dialog "Processed " & (count of dropped_items) & ". " giving up after 3

end open



on common(dropped_items)
    -- Required by debug routine.   
    global debugRunning
    set debugRunning to ""

    -- Write a message into the event log.
    log "  --- Starting on " & ((current date) as string) & " --- "
    tell application "Script Editor"
        activate
    end tell


    log "class = " & class of dropped_items

    try
        set pathToExiftool to do shell script "which /usr/local/bin/exiftool "
        log "Found exiftool here: " & return & pathToExiftool
    on error errMsg number n
        set theMsg to "could not find exiftool. Error message was " & errMsg & " error number was  " & n
        log theMsg
        display dialog theMsg giving up after 20
        return 1
    end try


    repeat with droppedItem in dropped_items
        log "class droppedItem = " & class of droppedItem
        set unixDroppedItem to POSIX path of droppedItem
        log "unixDroppedItem = " & unixDroppedItem
        set quotedUnixDroppedItem to quoted form of unixDroppedItem
        log "quoted form is " & quotedUnixDroppedItem
        set toUnix to pathToExiftool & " " & quotedUnixDroppedItem
        set seeUnix to do shell script toUnix
        debugLog("--- Before ---- " & unixDroppedItem & " ---------------")
        debugLog(seeUnix)

        --  Perfrom whatever action you want out of exiftool
        (* 
        see tags in a picture: 
        exiftool   /Users/mac/Desktop/rockSlab.JPG 
        the tags will have spaces in them leave out the spaces when typing the tag name 
        *)
        set toUnix to pathToExiftool & " " & "-CreateDate -CircleOfConfusion   " & quotedUnixDroppedItem

        set seeUnix to do shell script toUnix
        log return & "result of exiftool is  " & return & return & seeUnix & return & return
        debugLog(return & "result of exiftool is  " & seeUnix & return)
        set toUnix to pathToExiftool & " " & quotedUnixDroppedItem
        set seeUnix to do shell script toUnix
        debugLog("--->>> After <<< " & unixDroppedItem & " -------------------")
        debugLog(seeUnix)
    end repeat


end common



(* ======================== Common Subroutines ======================= *)
-- ------------------------------------------------------  
(*
*)
on appendToFile(fileId, theData)

    local theSize, writeWhere

    set theSize to (get eof fileId)
    set writeWhere to theSize + 1 as integer
    write theData to fileId starting at writeWhere

end appendToFile

-- ------------------------------------------------------  
(* 
 debug(<string>)
 Write messages to a log file.

  -- Need to place these two lines in the calling routine. 
    global debugRunning
    set debugRunning to ""
 -- references appendToFile()   
  -- example:
    debug("start program. Reading from " & listOfFiles)

   found here: /Users/mac/Documents/BJ\ Prior\ Years/BJ2004/sendmailapp2\ copy 

*)
on debug(theMessage)
    -- return
    global debugRunning
    local theSize, startupDiskName, pathToLog, fileReference

    set pathToLog to (path to home folder as text) & "tryAttachmentsLog.txt"
    -- log "pathToLog is " & pathToLog
    -- display dialog "pathToLog is " & pathToLog giving up after 4

    try
        -- Complete the path.
        set pathToLog to pathToLog as text
        set fileReference to (open for access file pathToLog ¬
            with write permission)

        if debugRunning = "" then
            set theSize to (get eof fileReference)
            if theSize > 0 then
                appendToFile(fileReference, " " & return)
            end if
            appendToFile(fileReference, "   --- debug on " & ((current date) as string) & "   --- " & return)
            set debugRunning to "running"
        end if
        -- log "theMessage " & theMessage
        -- display dialog "in debug..." & return & "theMessage " & theMessage giving up after 3
        appendToFile(fileReference, theMessage & return)

        close access fileReference
        tell application "Finder"
            set the creator type of the file pathToLog ¬
                to "R*ch"
        end tell
    on error mes number n
        try
            set commonErr to "error ... " & mes & " error number is " & n
            log commonErr
            close access fileReference
            display dialog commonErr giving up after 4
        end try

    end try
    -- log "end of debug"
end debug

(*
write log message to script editor log and to our file log 
*)
on debugLog(theMessage)
    log "debugLog: " & theMessage
    return debug(theMessage)
end debugLog

Ejemplo de salida:

(*  --- Starting on Wednesday, June 12, 2019 at 5:45:54 PM --- *)
(*desktopPath = Macintosh SSD:Users:mac:Desktop:*)
(*  --- Starting on Wednesday, June 12, 2019 at 5:45:59 PM --- *)
(*class = list*)
(*Found exiftool here: 
/usr/local/bin/exiftool*)
(*class droppedItem = alias*)
(*unixDroppedItem = /Users/mac/Desktop/rockSlab.jpg*)
(*quoted form is '/Users/mac/Desktop/rockSlab.jpg'*)
(*debugLog: --- Before ---- /Users/mac/Desktop/rockSlab.jpg ---------------*)
(*debugLog: ExifTool Version Number         : 10.36
File Name                       : rockSlab.jpg
Directory                       : /Users/mac/Desktop
File Size                       : 5.9 MB
File Modification Date/Time     : 2019:06:12 17:20:33-04:00
File Access Date/Time           : 2019:06:12 17:45:54-04:00
File Inode Change Date/Time     : 2019:06:12 17:21:08-04:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : Apple
Camera Model Name               : iPhone 4
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : Photos 1.0.1
Modify Date                     : 2019:06:12 17:04:56
Exposure Time                   : 1/120
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2019:06:12 17:04:56
Create Date                     : 2019:06:12 17:04:56
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/120
Aperture Value                  : 2.8
Brightness Value                : 5.52228164
Metering Mode                   : Multi-segment
Flash                           : Auto, Did not fire
Focal Length                    : 3.9 mm
Subject Area                    : 1295 967 699 696
Run Time Flags                  : Valid
Run Time Value                  : 3126374362166
Run Time Epoch                  : 0
Run Time Scale                  : 1000000000
Sub Sec Time Original           : 493
Sub Sec Time Digitized          : 493
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 1936
Exif Image Height               : 2592
Sensing Method                  : One-chip color area
Scene Type                      : Directly photographed
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Lens Info                       : 3.85mm f/2.8
Lens Make                       : Apple
Lens Model                      : iPhone 4 back camera 3.85mm f/2.8
XMP Toolkit                     : XMP Core 5.4.0
Creator Tool                    : Photos 1.0.1
Date Created                    : 2019:06:12 17:04:56
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 1936
Image Height                    : 2592
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Aperture                        : 2.8
Image Size                      : 1936x2592
Megapixels                      : 5.0
Run Time Since Power Up         : 0:52:06
Scale Factor To 35 mm Equivalent: 9.1
Shutter Speed                   : 1/120
Create Date                     : 2019:06:12 17:04:56.493
Date/Time Original              : 2019:06:12 17:04:56.493
Circle Of Confusion             : 0.003 mm
Field Of View                   : 54.4 deg
Focal Length                    : 3.9 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 1.60 m
Light Value                     : 9.9*)
(*
result of exiftool is  

Create Date                     : 2019:06:12 17:04:56
Circle Of Confusion             : 0.003 mm

*)
(*debugLog: 
result of exiftool is  Create Date                     : 2019:06:12 17:04:56
Circle Of Confusion             : 0.003 mm
*)
(*debugLog: --->>> After <<< /Users/mac/Desktop/rockSlab.jpg -------------------*)
(*debugLog: ExifTool Version Number         : 10.36
File Name                       : rockSlab.jpg
Directory                       : /Users/mac/Desktop
File Size                       : 5.9 MB
File Modification Date/Time     : 2019:06:12 17:20:33-04:00
File Access Date/Time           : 2019:06:12 17:46:00-04:00
File Inode Change Date/Time     : 2019:06:12 17:21:08-04:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : Apple
Camera Model Name               : iPhone 4
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : Photos 1.0.1
Modify Date                     : 2019:06:12 17:04:56
Exposure Time                   : 1/120
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2019:06:12 17:04:56
Create Date                     : 2019:06:12 17:04:56
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/120
Aperture Value                  : 2.8
Brightness Value                : 5.52228164
Metering Mode                   : Multi-segment
Flash                           : Auto, Did not fire
Focal Length                    : 3.9 mm
Subject Area                    : 1295 967 699 696
Run Time Flags                  : Valid
Run Time Value                  : 3126374362166
Run Time Epoch                  : 0
Run Time Scale                  : 1000000000
Sub Sec Time Original           : 493
Sub Sec Time Digitized          : 493
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 1936
Exif Image Height               : 2592
Sensing Method                  : One-chip color area
Scene Type                      : Directly photographed
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Lens Info                       : 3.85mm f/2.8
Lens Make                       : Apple
Lens Model                      : iPhone 4 back camera 3.85mm f/2.8
XMP Toolkit                     : XMP Core 5.4.0
Creator Tool                    : Photos 1.0.1
Date Created                    : 2019:06:12 17:04:56
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 1936
Image Height                    : 2592
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Aperture                        : 2.8
Image Size                      : 1936x2592
Megapixels                      : 5.0
Run Time Since Power Up         : 0:52:06
Scale Factor To 35 mm Equivalent: 9.1
Shutter Speed                   : 1/120
Create Date                     : 2019:06:12 17:04:56.493
Date/Time Original              : 2019:06:12 17:04:56.493
Circle Of Confusion             : 0.003 mm
Field Of View                   : 54.4 deg
Focal Length                    : 3.9 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 1.60 m
Light Value                     : 9.9*)
Result:
"R*ch"

1voto

Oskar Puntos 1242

La respuesta corta es iOS de Apple no exponer los datos que usted está buscando en el sistema de ficheros. El álbum de datos está dentro de un espacio aislado de la ubicación y no expuestos. Algunos de los metadatos incrustados en los archivos de imagen, y otra respuesta se muestra cómo iniciar raspado de que sólo a partir de la foto de las imágenes situadas en la porción abierta de que el sistema de ficheros.

El sancionado y también la forma más fácil de obtener que los datos es probable que va a ser a través de la API de iOS. Desde el nivel de código de preguntas fuera de tema aquí, voy a mantener esta respuesta a un de alto nivel de la descripción de lo que fue diseñado y enviado.

Del mismo modo, voy a dejar detalles de un jailbreak respuesta - alguien sin duda puede hacer que la respuesta mejor que yo. Si se puede hacer jailbreak a su dispositivo iOS, entonces los datos de nuevo disponible - potencialmente almacenados en el sistema de ficheros.

Usted no necesita ser un pagados desarrollador para obtener Xcode y empezar a desarrollar y el uso de la API - así que todo lo que necesitaría para iniciar este camino es un id de apple y tu un Mac y un dispositivo iOS.

AppleAyuda.com

AppleAyuda es una comunidad de usuarios de los productos de Apple en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by: