@@ -165,31 +165,36 @@ public function mapData(array $source)
165165 $ exposureTime = '1/ ' . round (1 / $ source ['ExposureTime ' ]);
166166 }
167167
168- //var_dump($source);
168+ $ caption = false ;
169+ if (isset ($ source ['Caption ' ])) {
170+ $ caption = $ source ['Caption ' ];
171+ } elseif (isset ($ source ['Caption-Abstract ' ])) {
172+ $ caption = $ source ['Caption-Abstract ' ];
173+ }
169174
170175 return array (
171176 Exif::APERTURE => (!isset ($ source ['Aperture ' ])) ? false : sprintf ('f/%01.1f ' , $ source ['Aperture ' ]),
172- Exif::AUTHOR => false ,
177+ Exif::AUTHOR => (! isset ( $ source [ ' Artist ' ])) ? false : $ source [ ' Artist ' ] ,
173178 Exif::CAMERA => (!isset ($ source ['Model ' ])) ? false : $ source ['Model ' ],
174- Exif::CAPTION => false ,
179+ Exif::CAPTION => $ caption ,
175180 Exif::COLORSPACE => (!isset ($ source [Exif::COLORSPACE ]) ? false : $ source [Exif::COLORSPACE ]),
176- Exif::COPYRIGHT => false ,
181+ Exif::COPYRIGHT => (! isset ( $ source [ ' Copyright ' ])) ? false : $ source [ ' Copyright ' ] ,
177182 Exif::CREATION_DATE => (!isset ($ source ['CreateDate ' ])) ? false : DateTime::createFromFormat ('Y:m:d H:i:s ' , $ source ['CreateDate ' ]),
178- Exif::CREDIT => false ,
183+ Exif::CREDIT => (! isset ( $ source [ ' Credit ' ])) ? false : $ source [ ' Credit ' ] ,
179184 Exif::EXPOSURE => $ exposureTime ,
180- Exif::FILESIZE => false ,
185+ Exif::FILESIZE => (! isset ( $ source [Exif:: FILESIZE ]) ? false : $ source [Exif:: FILESIZE ]) ,
181186 Exif::FOCAL_LENGTH => $ focalLength ,
182187 Exif::FOCAL_DISTANCE => (!isset ($ source ['ApproximateFocusDistance ' ])) ? false : sprintf ('%1$sm ' , $ source ['ApproximateFocusDistance ' ]),
183- Exif::HEADLINE => false ,
188+ Exif::HEADLINE => (! isset ( $ source [ ' Headline ' ])) ? false : $ source [ ' Headline ' ] ,
184189 Exif::HEIGHT => (!isset ($ source ['ImageHeight ' ])) ? false : $ source ['ImageHeight ' ],
185190 Exif::HORIZONTAL_RESOLUTION => (!isset ($ source ['XResolution ' ])) ? false : $ source ['XResolution ' ],
186191 Exif::ISO => (!isset ($ source ['ISO ' ])) ? false : $ source ['ISO ' ],
187- Exif::JOB_TITLE => false ,
192+ Exif::JOB_TITLE => (! isset ( $ source [ ' JobTitle ' ])) ? false : $ source [ ' JobTitle ' ] ,
188193 Exif::KEYWORDS => (!isset ($ source ['Keywords ' ])) ? false : $ source ['Keywords ' ],
189194 Exif::MIMETYPE => (!isset ($ source ['MIMEType ' ])) ? false : $ source ['MIMEType ' ],
190195 Exif::ORIENTATION => (!isset ($ source ['Orientation ' ])) ? false : $ source ['Orientation ' ],
191196 Exif::SOFTWARE => (!isset ($ source ['Software ' ])) ? false : $ source ['Software ' ],
192- Exif::SOURCE => false ,
197+ Exif::SOURCE => (! isset ( $ source [ ' Source ' ])) ? false : $ source [ ' Source ' ] ,
193198 Exif::TITLE => (!isset ($ source ['Title ' ])) ? false : $ source ['Title ' ],
194199 Exif::VERTICAL_RESOLUTION => (!isset ($ source ['YResolution ' ])) ? false : $ source ['YResolution ' ],
195200 Exif::WIDTH => (!isset ($ source ['ImageWidth ' ])) ? false : $ source ['ImageWidth ' ],
0 commit comments