ZenphotoCMS Forum
Specifying image description with FTP upload - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Specifying image description with FTP upload (/thread-8729.html)



Specifying image description with FTP upload - tedavery - 2011-06-17

Hi there,

I'm doing a very simple integration of Zenphoto simply by taking publicly uploaded files through a form and moving them to an album folder, where they can be approved for publishing afterwards.

The photos conveniently use the filenames as titles. Is there a way I could also specify the description? Be it in the filename or by somehow interacting with the Zenphoto code?

Thanks!




Specifying image description with FTP upload - acrylian - 2011-06-17

Use EXIF meta data.




Specifying image description with FTP upload - tedavery - 2011-06-17

Perfect -- thank you!

For future Googlers who may stumble across my post, there are a lot of complex image libraries out there that rank highly when searching, but you can pull this off with built-in PHP functions by first stripping out existing EXIF data by recreating the image like so:

Then embedding the new data using the example code here: http://php.net/manual/en/function.iptcembed.php
The line '2#120' => 'Test image' is what corresponds to the image description.