TranJPEG
Version 1.00

Contents
--------
[ Introduction | Installation | Usage | Theiconbaricon |
Controlwindow | Fullsizecontrolwindow | Thestatuswindow |
Screenshots | Contact ]

[ Licence ]

Introduction
------------
TranJPEG is a WIMP front-end for the IJPG command-line utility
'jpegtran' and gives easy access to the features of the utility. It
allows JPEG images to be transformed in a number of ways in a lossless
process. See below for a list of the transformations currently
supported by TranJPEG.

Installation
------------
For a new installation, simply drag and drop the TranJPEG application
into the directory of your choice.

If you have a previous copy of TranJPEG you have two choices.

Move the old version of TranJPEG somewhere safe and replace it with
the new version

Simply copy the new version over the old version, with filer options
set to 'Force' and 'Newer'

Usage
-----
TranJPEG is run in the usual way by double clicking on its icon. It
will install on the icon bar.

The file, or selection of files, to be transformed should be dragged
to TranJPEG, either to the iconbar icon, when the control window will
open, or if the control window is already open, files may be dragged
to it.

The selection of files can be added to by dragging further selections.
In addition, if one or more folders are dragged, then TranJPEG will
add any JPEG files in the folder to the list.

TranJPEG will NOT recurse down the directory structure, only JPEG
files in the top level will be added to the filelist.

TranJPEG uses a taskwindow to run the jpegtran binary, so the process
essentially multitasks, and the machine remains usable during the
batch processing.

The iconbar icon
----------------
If a selection of JPEG files is dragged to the iconbar icon, these
files will be added to the list of files to be processed. The control
window will open automatically if not already open. Clicking with
SELECT on the iconbar icon will open the control window.

The icon bar menu
~~~~~~~~~~~~~~~~~
Info
~~~~
Shows application information, including the version number, and also
contains a Web button to check the download site for new versions.

Help...
~~~~~~~
Opens the html help file (this one).

Control...
~~~~~~~~~~
Open the TranJPEG control window (see below). The control window can
more easily be opened by clicking on the icon bar icon with Select.

Quit
~~~~
Remove the application from the iconbar.

The control window
------------------
The default control window is shown below.

Files to process
~~~~~~~~~~~~~~~~
This shows the number of files waiting in the queue to be processed

Clear file list
~~~~~~~~~~~~~~~
Clicking this button allows the file list to be cleared if you change
your mind about files in the list. It will clear the whole list.

The available transformations
-----------------------------
Clicking SELECT on one of the transformation buttons will start the
batch process off. The transformations that can be invoked are
described below. Most are self-evident.

Rotate left
~~~~~~~~~~~
Click SELECT to rotate each of the images 90 to the left.

Rotate 180
~~~~~~~~~~~
Click SELECT to rotate each of the images through 180.

Rotate right
~~~~~~~~~~~~
Click SELECT to rotate each of the images 90 to the right.

AUTO rotate
~~~~~~~~~~~
This option relies on
 * The image file containing valid exif data
 * The camera writing an 'orientation flag' into the exif data. This
   is sometimes a user setting, rather than a default action

TranJPEG will attempt to read the orientation flag from the exif data,
and if successful, will rotate the image according to the setting of
this flag. Images with no exif data, or no orientation flag will be
ignored.

Flip horizontal
~~~~~~~~~~~~~~~
Click SELECT to flip each of the images left to right.

Flip vertical
~~~~~~~~~~~~~
Click SELECT to flip each of the images top to bottom.

Transpose
~~~~~~~~~
Click SELECT to transpose each of the images (across the upper left to
lower right axis). This can be thought of as a rotation to the right
followed by a reflection (flip) left to right.

Transverse
~~~~~~~~~~
Click SELECT to carry out the transverse operation on each of the
images (across the upper right to lower left axis). This can be
thought of as a rotation to the left followed by a reflection (flip)
left to right.

Destination of transformed file
-------------------------------
TranJPEG will not overwrite the original image. Instead, it will put
the transformed image into a directory (in the same location as the
original image) named for the transformation, e.g. 'rotleft'.

The full size control window
----------------------------
Toggling the TranJPEG window to full size (click on the top right
corner icon) reveals more options.

Trim non-transformable edge blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following is taken from the Independent JPEG Group's documentation
for jpegtran

The transpose transformation has no restrictions regarding image
dimensions. The other transformations operate rather oddly if the
image dimensions are not a multiple of the iMCU size (usually 8 or 16
pixels), because they can only transform complete blocks of DCT
coefficient data in the desired way.

jpegtran's default behavior when transforming an odd-size image is
designed to preserve exact reversibility and mathematical consistency
of the transformation set. As stated, transpose is able to flip the
entire image area. Horizontal mirroring leaves any partial iMCU column
at the right edge untouched, but is able to flip all rows of the
image. Similarly, vertical mirroring leaves any partial iMCU row at
the bottom edge untouched, but is able to flip all columns. The other
transforms can be built up as sequences of transpose and flip
operations; for consistency, their actions on edge pixels are defined
to be the same as the end result of the corresponding
transpose-and-flip sequence.

For practical use, you may prefer to discard any untransformable edge
pixels rather than having a strange-looking strip along the right
and/or bottom edges of a transformed image.

Copying exif data
~~~~~~~~~~~~~~~~~
The three radio buttons control what jpegtran does with any exif data
in the image file. You can choose to copy everything into the
transformed image, only the exif comments, or nothing at all.

Neither TranJPEG nor jpegtran will modify the exif data in any other
way. This means, for example, that the orientation data will remain
the same. If the rotated image is then viewed in software that uses
the orientation data, then it may rotate the image again. The
thumbnail, if present, will still show the image in its original
orientation.

The status window
-----------------
When one of the transformation buttons is clicked, assuming there are
some JPEG files in the queue, the control window will close, and the
status window will open. This is shown below.

There are four display fields which show the progress of the
processing. The total number of files to process, and the position in
the queue of the current file are shown. The filename of the current
file is also shown. There is also a field that shows the current
operation being carried out.

The two buttons at the bottom allow some control over the taskwindow
processing.

Pause
~~~~~
This will allow the current trransformation to be paused. The button
text will change to Resume, and clicking on it again will result in
the transformation being continued.

Kill
~~~~
This will immediately terminate the current transformation. The
transformed image file may be left in a partially processed state and
should be deleted.

If there are more images waiting in the queue to be processed,
TranJPEG will ask whether it should continue to process these
remaining images, or abandon the whole process.

Screenshots
-----------
All the screen shots in these pages were obtained using Snapper, a
versatile screen capture application.

Snapper is available from
http://www.chris-johnson.org.uk/software/snap.html

Contact
-------
All communication about TranJPEG should be directed to Chris Johnson
(Email:chris@chris-johnson.org.uk). Suggestions for new features are
always welcome.

Web sites
---------
Chris Johnson's web site is at
http://www.chris-johnson.org.uk/index.html, with his RISC OS software
at http://www.chris-johnson.org.uk/software/index.html.

This document last modified on 19th January 2013

Licence
-------

TranJPEG

Copyright (c) 2013, Chris Johnson
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
