Member
Member
benjancewicz   2008-03-09, 06:45
#1

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?

Member
Member
benjancewicz   2008-03-17, 03:32
#2

Any ideas?

Member
Member
sbillard   2008-03-17, 13:31
#3

You could insert code to replace the line endings with . 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.

echo str_replace("n", $exiftext); should do it.

Member
Member
benjancewicz   2008-06-18, 17:50
#4

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?

Member
Member
sbillard   2008-06-18, 23:54
#5

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", "", $desc);`
Member
Member
benjancewicz   2008-12-30, 06:37
#6

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

Member
Member
sbillard   2008-12-30, 20:42
#7

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.

Member
Member
benjancewicz   2008-12-30, 20:53
#8

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.

Member
Member
Gene   2008-12-30, 21:00
#9

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.

Member
Member
benjancewicz   2008-12-31, 16:55
#10

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[+-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

:

Member
Member
Gene   2008-12-31, 17:53
#11

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.

Member
Member
eF   2008-12-31, 18:02
#12

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!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.