![]() |
|
Line Breaks in EXIF data? - 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: Line Breaks in EXIF data? (/thread-2376.html) |
Line Breaks in EXIF data? - benjancewicz - 2008-03-09 Is there any way to get ZenPhoto to recognize line breaks in EXIF data? My descriptions really run together like the following example: http://www.zerflin.com/ZenPhoto/index.php?album=works%2FVector+Things&image=Stars+Page+5-6.jpg Is there anything I can do? Line Breaks in EXIF data? - benjancewicz - 2008-03-17 Any ideas? Line Breaks in EXIF data? - sbillard - 2008-03-17 You could insert code to replace the line endings with `<br/>`. It is probably not a good idea for zenphoto to do it since the behavior depends on where it is being displayed. In `alt=` text you want the line ends. In HTML you want the `<br/>`. `echo str_replace("n", $exiftext);` should do it. Line Breaks in EXIF data? - benjancewicz - 2008-06-18 I'm not sure I get what you mean... where else would the EXIF data be displayed in ZenPhoto other than in the image preview? And where does that code go? Somewhere in image.php? Line Breaks in EXIF data? - sbillard - 2008-06-18 Your example seems to no longer be there. `printImageDesc()` already replaces line breaks with , so I don't know which EXIF data is causing you the problem. But when you print that data is where you would have to replace the new lines with the . In general, zenphoto will format the output if you are using a printXXX() function but will not format it if you are using a getXXX() function. So wherever you use the getXXX() function and then display the result you would need to replace the line feeds by the . By the way, the code above did not display correctly. And it does not deal with return characters. Here is the corrected code (if I can make it show.) ` $desc = htmlspecialchars(getImageDesc()); $desc = str_replace("\r\n", "\n", $desc); $desc = str_replace("\n", "<br/>", $desc);` Line Breaks in EXIF data? - benjancewicz - 2008-12-30 Hi sbillard, I'm still having trouble with this. It seems like when the EXIF data is imported, it looses the line breaks. Here is one image, just imported: http://www.zerflin.com/ZenPhoto/index.php?album=services%2FPortrait+Photography&image=Jamel+McMillian.jpg However, once I click on the description in the editor (when the full view of the image is displayed), the line breaks show up. Upon hitting save, it looks like this photo here: http://zerflin.com/ZenPhoto/index.php?album=artwork%2FPhotography+People&image=Jamel+McMillian.jpg Line Breaks in EXIF data? - sbillard - 2008-12-30 Line endings are a funny thing. Unfortunately they are not standardized. You will have to figure out what is being used as a line break in your EXIF and use the code above to change it into the ` ` HTML. Line Breaks in EXIF data? - benjancewicz - 2008-12-30 I see. Do you know a way I can break into the EXIF code in an image? Currently, I'm using Adobe Bridge to edit the EXIF data. Line Breaks in EXIF data? - Gene - 2008-12-30 exiftool is a great command line EXIF editor: http://www.sno.phy.queensu.ca/~phil/exiftool/ I have used it under Linux and Cygwin, there is a windows version of it as well. Line Breaks in EXIF data? - benjancewicz - 2008-12-31 I downloaded and installed it... but I have no idea how to use it. How does this work? How do I get it to read an image? I opened up Terminal and I got this: EXIFTOOL(1) User Contributed Perl Documentation EXIFTOOL(1) NAME exiftool - Read and write meta information in files SYNOPSIS exiftool [OPTIONS] [-TAG...] [--TAG...] FILE... exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE... exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE... exiftool [ -ver | -list[w|f|wf|g[NUM]|d] ] For specific examples, see the EXAMPLES sections below. DESCRIPTION A command-line interface to Image::ExifTool, used for reading and writ- ing meta information in image, audio and video files. FILE is a source file name, directory name, or "-" for the standard input. Information is read from the source file and output in readable form to the console (or written to an output text file with the -w option). To write or copy information, new values are specified with the -TAG=[VALUE] syntax or the -tagsFromFile option. This causes FILE to be rewritten, and by default the original file is preserved with "_original" appended to the file name. (Be sure to verify that the new file is OK before erasing the original.) Once in write mode, exiftool : Line Breaks in EXIF data? - Gene - 2008-12-31 You can run `exiftool image.jpg` to get all EXIF data from the file. Specific to what you're doing, `exiftool -ImageDescription image.jpg` should give you the image description. To modify the image description: `exiftool -ImageDescription+="text" image.jpg`. Line Breaks in EXIF data? - eF - 2008-12-31 you can get an GUY at this adress: http://freeweb.siol.net/hrastni3/foto/exif/exiftoolgui.htm. It will permit to use Exiftools in and very friendly interface. Hope that's help eF! |