Solved

FTP JPEG re-directing based on EXIF Orientation data

Posted on 2013-01-23
2
239 Views
Last Modified: 2013-04-08
Is there any FTP program (or any program) that in realtime, redirect for JPEGS to specific folder based on it's EXIF orientation data (landscape or portrait)?
0
Comment
Question by:abs-ptony
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Merete earned 250 total points
ID: 38813816
Not that I know when you understand that  FTP is just a File Transfer Protocol, using a standard network protocol to transfer files from one host or to another host over a TCP-based network, such as the Internet.
It has no other way / method api to read or identify with the source files unless you can rewrite the syntax.
And the syntax is created in the source folder and must natch the directory output usualy a web page etc
Here is a list of syntax
http://en.wikipedia.org/wiki/File_Transfer_Protocol#List_of_FTP_commands

http://insightfuldevelopment.com/how-to-use-ftp-website-files-folders-directory/
0
 
LVL 38

Assisted Solution

by:BillDL
BillDL earned 250 total points
ID: 38814291
Hi abs-ptony

I cannot think that too many people will ever have had the need to do what you need, but you never know.  Somebody may well have had to write their own application, but I have never come across such all-in-one program.

If you wouldn't mind doing this from the command line and using two separate little programs, then this could be scripted in a "DOS" batch file or VBScript.  For example I have used a little standalone command line "Exif Reader" program that can be called from a batch file to extract the orientation code (or description which is less helpful) and then, dependent on what code is returned, the batch file could then issue a different FTP command, one to upload to a "portrait mode" folder and the other to a "landscape mode" folder.

Windows has its own native command line driven FTP client program:
http://ss64.com/nt/ftp.html
Generally you run it by specifying a script file that it walks through.

I'm assuming that you would be working with just a few local folders containing quite a few images to upload at one time.  That being the case a batch file can be made to walk through all folders and sub-folders starting from a specified path processing any JPGs it finds, or to process a list of images.  That part isn't a problem.

I have used the little ExifTool program by Phil Harvey for various purposes in the past:
http://www.sno.phy.queensu.ca/~phil/exiftool/
In this case we could just use it to read the orientation code as an integer from a JPG:
REM http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#reading_examples

The thing about EXIF orientation codes is that it's not quite as simple as "portrait" or "landscape".  For instance, if you held the camera in landscape mode upside down it would store a different orientation code in the EXIF tags than holding it in landscape mode the right way up.  The Exif specification defines an Orientation Tag to indicate the orientation of the camera relative to the captured scene.  The codes are explained visually here:

REM http://sylvana.net/jpegcrop/exif_orientation.html
REM http://www.impulseadventure.com/photo/exif-orientation.html

It would be relatively easy in a batch file to do an "IF value=n THEN" type test of the returned code to determine if it was landscape (correct way up or upside down) or if it was portrait mode (camera rotated left or right) and detect it as landscape or portrait.

If you are open to using a batch file, a 3rd-party Exif reading program, and either built-in Windows FTP or any number of 3rd-party command line programs, then perhaps the easiest way to verify whether this is likely to work would be for you to attach samples of a portrait and landscape JPG image.

Let us know what you think.

Bill
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
The advancements in today's technology are unparalleled. Much of the technology that we have could not have been imagined twenty years ago. One of the latest additions to the list of technological advances is virtual reality. Virtual reality has an …
Viewers will learn how to create a new project within Adobe Encore and the basic layout of the software.
Viewers will learn the basics of creating custom device Racks in Ableton Live. Place instrument(s) and effects onto a track, and select them all by holding the Shift key and clicking on the device title bars: Group them by typing Command-G (Ctrl-G…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question