Solved

FTP JPEG re-directing based on EXIF Orientation data

Posted on 2013-01-23
2
245 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll explain how to setup a Plex Media Server (https://plex.tv/) on a Redhat (Centos) 7 based NAS with screenshots to help those looking for assistance.  What is Plex? If you aren't familiar with Plex, it’s a DLNA media serv…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
Viewers will learn how to use LFOs to modulate the sound of their Sampler instruments. Click the Modulation tab in Sampler: Choose one (or more) of the three available LFOs, and click the respective button to turn it on: Select a waveform, an LF…

734 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