Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simuntanelously view JPG and text file

Status
Not open for further replies.

uguess

Technical User
Nov 5, 2004
40
CA
I have 1 directory with images and a 1 text file that has info regarding those jpg. The common thing between jpg image and text file is serial number. Example.

1) folder 1 JPG file names are => 000001.jpg
2) I have 1 text file within that data starts with JPG serial number 000001.

Can i do the following.
1) Do unix have graphic editor to open up JPG image.
2) Can it open JPG image & info for that image (from serial match) in a 1 view.

 
You could write a script, which takes the images and the texts and creates a .html-file, relating them together.
Code:
<html>...
<img src='001.jpg' alt='The wonderful info' .../>
<img src='002.jpg...
...</html>
Then you may view both in a browser.

A graphic-editor normally doesn't allow to open a text-info.
Not even manually.

But you get gimp as Open-Source and may try to program that functionality - perhaps as a plugin.

What's about displaying them in the broser, and opening the graphic-editor on clicking on the image?

seeking a job as java-programmer in Berlin:
 
That sounds like a great idea.

Since my images are stored in windows and file is in unix. What is the best approach to get them both in HTML.
1) Get text file imported to windows. But then how would unix or perl script work in windows.
2) get images exported to unix directory. (kind of a headache). Is there a way unix can access shared folder from windows server.

Secondly how can this be accomplish with a perl or unix. can you please show the script.

Thankyou.
 
You may consider samba and even smbfs[/s] if linux.
Another way is the standard NFS with ServicesForUnix (aka Interix) or CygWin available on the windows side.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
How are the images and the textfile(s) created?
Why on different machines?

I understand, that there is one textfile with multiple entries (one on each line?) and one directory containing the images.

Do they change often?
Is there allways a match in one direction - i.e.: if there is a info in the file, can we be sure to find a corresponding image?

How actual has the program to be?

Which services are run on the machines?

An easy solution would be, to transfer the info-file or the images from one machine to the other by ftp or scp.
A sheduler could update the html-page in regular intervals, if the content changes of the directory or the file.

The serial-number reminds of a database, which may store the image as binary-object, or the path to the image, and of course the text. Then it would be easy to write a small java-program to display image and text, and to let the user customize a program to call, to edit the image.

Of course other languages can be used as well.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top