Japanese document is here...

Rota Readme

About Rota

Rota.exe is loss-less rotate utility for JPEG image.

To get large compression ratio (about 1/5 to 1/50), JPEG uses lossy compression method. Therefore once image has been compressed to JPEG, it is not possible to retrieve original image from it. If you take a picture of some guy by vertical camera position, maybe you'd like to rotate image to stand it upright. In usual, it takes 3 steps to rotate JPEG image: de-compress JPEG to bitmap, rotate bitmap, re-compress bitmap to JPEG. This re-compress process cause additional loss of image quality. The samples shown below do this routine 4 times;
  1. Open JPEG image by Micrografx PicturePublisher 8
  2. Rotate 90degrees
  3. Save with JPEG format





JPEG compression parameter is YUV=4:2:2, compression ratio is 10 (equivalent to '90' or 'High Quality' at other JPEG application). It's clear that image quality has lost at each step.






Loss-less JPEG Rotation doesn't de-compress JPEG image completely and moves intermediate data from-to rotate 90/180/270 degrees position. It doesn't cause loss of image quality. The samples shown above do loss-less JPEG rotation 4 times by Rota. No loss of image quality occurred.

Rota copies all the JPEG Marker information during rotate process, it means that all the picture information in original image (e.g. date&time, shutter speed, F-stop etc.) is preserved. Also Rota can use as Application launcher.

Requirements

Windows 32bit (Windows95/98/NT/2000 etc), Rota won't work with Win32S

Computer used for testing

WindowsNT4.0SP6 PentiumPro 200MHz AT Clone
Windows2000 MMX-Pentium 166MHz Sub-note PC
WindowsMe/Windows2000 Athlon 800MHz AT Clone



Getting Started

Copy Rota.exe to the folder of your choice then place a shortcut to Rota on your Desktop. Rota works as standalone utility, no DLLs or other drivers are needed. After startup you are presented with the window as seen below. It's very simple and easy to use.



At a point of time, only 3 buttons ( [Open][Exit][?] ) are active.

1: Open Button


If you click [Open] Button, dialog box shown as left will open. Select the drive and the folder that contains images you want to rotate. If there are '.JPG' , '.JPE' or '.JPEG' file in the folder, right box will displays file list.

If your selection of drive and folder are completed, press [OK] button.

** Notice **

If you want to select the drive's ROOT folder (C:\, F:\ etc), just Double-Click the icon of root folder. In the case of left picture, double-click the icon , above the 'Multimedia Files'.


If you can't determine drive and folder are correct, you can view the thumbnail of image by clicking the filename in right box.

At this time, you can launch application that is associated with '.JPG','.JPE' or 'JPEG' by three ways,
  1. double-click
  2. middle-click(or click scroll wheel)
  3. left-click with control-key
mouse on the thumbnail image.

If your selection of drive and folder are completed, press [OK] button.

Then window will change as seen below. If you find that you selected wrong folder, press [Open] button again will abort processing.

If PageSize is 'S', Rota can display 20 images at a time. 'M' is 30 images and 'L' is 48 images per page. If there is more than one page, you can change the display position by click the ScrollBar, press Cursor, [PageUp] / [PageDown] Key or rotate [Mouse Wheel].


** Notice **

Rota can handle up to 2,000 images but actual maximum number of images Rota can handle depends on Windows' system dll, ComCtl32.dll. It seems that maximum number of Windows98/Me system is 648, WindowsNT/2000 is 1633. If Rota reports [Error: Can't add thumbnail: image XXX], please decrease number of file and try again.



2: How to operate image?

2-1: Rotate image

It's very simple. Click image by left mouse button rotates image to left, right mouse button rotates image to right.
Be attention that rotate of image will affect after press [Apply] button.

2-2: Copy / Delete image

Place mouse cursor on your designated image then press [Insert] Key to copy image to another folder. Press [Delete] Key to delete image from folder.

2-3: Launch application

If your mouse has middle-button(or scroll wheel), middle-click on image launches the application associated to '.JPG' , '.JPE' or '.JPEG'. At the default setting of Windows98/2000, Internet Explorer will be launched. I recommend associating '.JPG' to your favorite photo retouch software.

If your mouse doesn't have middle-button, left-click with press control-key of your keyboard will also launches associated application.

To quickly associate application to '.JPG', select '.JPG' file from MyComputer or FileExplorer, then right click with Ctrl-Shift key, click 'Open Application', select application and check 'always use'.

3: Larger image window

Left window displays selected image a little bit larger. File name will be displayed above the image, file timestamp and picture information (if exists) will be displayed below.
image information
At first, back color of filename is Aqua(as image below-left). After you modified image direction, it changes to Lime(as below-mid). If selected image has Read-Only attribute, Red Mark RO will appears at the rigit of filename(as below-right).

not rotated

rotated

read only file

When you rotated Read-Only image and click Apply button, dialog like below will appear. If you want to ignore Read-Only attribute and apply rotate, press Yes button. If you want to ignore the entire Read-Only attribute, press Yes to All button.



4: Exchange mouse button

If you are exchanging mouse button by mouse control panel, [Exc. Mouse Button] check box will help you to keep your mind peacefully.


5: Save configuration

When you close Rota.exe, some of configuration parameter is saved automatically. Configuration file name is Rota.ini, placed the same folder of Rota.exe.

[Control] section
Folder= last opened folder name
PageSize= display size, 0 means 'S', 1 means 'M', 2 means 'L'.
MouseEx= Mouse button exchange status. 0 means not changed, 1 means changed.



F.A.Q.

I want to write JPEG application.
Borland C++Builder5/Delphi supports JPEG image by standard library. It's very convenient. Rota contains complete source code. Please refer it. I used many library components imported from Delphi, maybe it's not so hard to port to Delphi.
Or, if you need more detailed handling of JPEG image, there is free JPEG library by Independent JPEG Group (IJG). Rota uses it for loss-less rotate. It seems that Borland C++Builder/Delphi and Microsoft Internet Explorer uses IJG library. For more details of IJG license, refer 'README' file in this package.

I tried to open huge number of images, Rota reports [Error: Can't add thumbnail: image XXX] and terminated.
Rota can handle upto 2,000 images, but actual maximum number of images Rota can handle is depends on Windows' system dll, ComCtl32.dll. It seems that maximum number of Windows98/Me system is 648, WindowsNT/2000 is 1633. If Rota reports [Error: Can't add thumbnail: image XXX], please decrease number of file and try again.

During operation, image rotates correctly. After program terminated, Image has not rotated.
To affect rotating image, you must press [Apply] button.

Why main-image has rotated but thumbnail-image has not?
Even it's loss-less, byte-count of JPEG image will vary a little bit after loss-less rotate. Sorry but it's difficult to replace thumbnail.

I can't select the ROOT folder of drive.
If you want to select the drive's ROOT folder (D:\, F:\ etc), just Double-Click the icon of root folder (e.g.).

Rota displays drive's ROOT folder only / Rota doesn't display some of folder tree.
To extract the folder tree, Double-Click the folder icon (e.g.).

I have NNNN's digicam but Rota doesn't show its MakerNote information. Please add it!
I have no information about NNNN's MakerNote. Please send me a NNNN's MakerNote format information then I can add it. And, some of digicam(e.g.SONY,older CASIO and Fujifilm) doesn't have MakerNote.


.

Appendix1: About Independent JPEG Group JPEG library


JPEG library of Independent JPEG Group is well known and widely used as free JPEG library. You can download it from http://www.ijg.org/. Newest version is v6b.

This is a tip for Borland C++Bulder5 / C++5.5

IJG library contains makefile and jconfig.h for Borland C++ v3.0(very-old, 8 years ago?), but it's still possible to compile it with Borland C++Builder5/C++ v5.5 O.K., just type 'make' from command console.

Currently Borland C++5.5 is freeware, you can download it from http://www.inprise.com.


IJG library contains some of command-line utilities. The most convenient tool is jpegtran.exe, JPEG transform utility. Rota is based on it. For example, loss-less rotate JPEG image is

jpegtran -rotate 90 -copy all infile.jpg outfile.jpg

if '-copy all' option added, all the Application Marker information in source JPEG file will be copied to destination. Picture information in digicam's Exif format uses Application Marker 1 (APP1), so jpegtran preserves all the Exif information. But jpegran.exe always adds Application Marker 0 (APP0) before APP1 Marker, most of utilities can't recognize it contains Exif information. To avoid it, just add

jpeg_copy_critical_parameters(&srcinfo, &dstinfo);
dstinfo.write_JFIF_header = FALSE;   //<<< this line!

to line 453 of jpegtran.c, this patch suppresses APP0 Marker output.


.

Appendix2: Picture information


Rota displays some of picture information that Exif/JFIF(JFXX) stores. It depends on type of your digicam that what kind of information stored in the image file. For example, Kodak DC260/DC290/DC4800 store SubjectDistance but DC215/DC240/DC280 don't store it. Currently Rota can display following picture informations.

Exif format
TagExamples of displayDesc.
ExposureTime1/10s, 0.9sExposure time. [s]
FNumberF3.2, F5.6F-stop of lens [no unit]
FocalLengthf5.0mm, f150.0mmFocal length of lens [mm]
SubjectDistancedist0.63m, dist136.0mDistance to focus point [m]
MeteringModeCenter-w., Multi-seg.Exposure meterig mode
ExposureBiasValueExp.bias-0.7Exposure bias value of taking picture [EV]
ISOSpeedRating /
ExposureIndex
ISO100, ISO160CCD sensitivity
FlashFlashOnFlash was used or not
ModelC2100UZ, SX112Model number of digicam
DateTimeOriginal2000:07:13 22:25:00Date/Time of original image taken

Exif MakerNote
FujifilmExamples of displayDesc.
0x1000:QualityQuality NormalJPEG compression quality
0x1001:SharpnessSharpness SoftImage sharpness
0x1002:White BalanceWhiteBl. DaylightWhite balance setting
0x1010:Flash ModeFlashMode RedEyeFlash mode
0x1011:Flash StrengthFlashPow. 6/10Flash strength, unit is [EV]
0x1020:Macro ModeMacroMode OffMacro mode or not
0x1021:Focus ModeFocusMode ManualAF or Manual
0x1030:SlowSync ModeSlowSync OffSlow shutter synchro mode
0x1031:Picture ModePictMode Aperture PrPicture taking mode
0x1100:Continuous TakeContTake OnContinuous Picture taking mode
0x1300:Blur WarningBlueWarn YesBlur warning (shutter speed is too slow) indicator
0x1301:Focus WarningFocusWarn YesAuto Focus warning (focus error) indicator
0x1302:AE WarningAE Warn YesAE warning (over exposure) indicator
Nikon type1 (E900/950/700/800)Examples of displayDesc.
0x0003:QualityQuality 6Picture quality mode
0x0005:Image AdjustmentImageAdj. Contrast+Image setting
0x0006:ISO SpeedISO Speed 80ISO speed rating
0x0007:White BalanceWhiteBl. DaylightWhite balance setting
0x0008:Focus modeFocus InfinityFocus mode, normal or infinity
0x000a:Digital ZoomDigiZoom 160/100Digital zoom ratio
0x000b:ConverterConverter FishEyeLens converter mode
Nikon type2 (E990/E880/D1)Examples of displayDesc.
0x0002:ISO SpeedISO Speed 200ISO speed rating
0x0004:QualityQuality FINEJPEG compression quality
0x0005:White BalanceWhiteBl. AUTOWhite balance setting
0x0006:SharpnessSharpness NORMALImage sharpness setting
0x0007:Focus ModeFocus AF-SFocus mode
0x0008:Flash ModeFlash ONFlash mode
0x000f:ISO SelectISO Sel. ManualManual ISO select or Auto gain-up
0x0080:Image AdjustImageAdj. CONTRAST(+)Image setting
0x0082:AdapterAdapter FishEye 2Lens converter mode
0x0085:MF distanceMF Dist. 3mManual focus distance
0x0086:Digital ZoomDigiZoom 160/100Digital zoom ratio
0x0088:Focus PositionFocusPos. UpperAF focus position
CasioExamples of displayDesc.
0x0001:Recording ModeMode Night ScenePicture recording mode
0x0002:QualityQuality FineJPEG compression quality
0x0003:Focus ModeFocusMode Manual FocusFocusing mode
0x0004:Flash ModeFlashMode Red EyeFlash firing mode
0x0005:Flash StrengthFlashStr. StrongFlash firing strength
0x0006:Object distanceDistance 4.5[m]Object distance
0x0007:White balanceWhiteBl. DaylightWhite balance setting
0x000a:Digital ZoomDigiZoom 2XDigital Zoom ratio
0x000b:SharpnessSharpness HardImage sharpness setting
0x000c:ContrastContrast HighImage contrast setting
0x000d:ChromaChroma HighImage chroma(saturation) setting
0x0014:ISO SpeedISO Speed 64ISO speed rating
Olympus/Sanyo/EpsonExamples of displayDesc.
0x0200:ModeMode Fast/Seq.2Taking mode/Sequence no.
0x0201:JPEG qualityJpegQual. SQImage quality setting
0x0202:Macro ModeMacroMode OffMacro mode setting
0x0204:Digital ZoomDigiZoom 2/1Digital zoom ratio
0x0207/0x020d:Model CodeModel code SR951Model code

JFIF(JFXX) format
Info nameExamples of displayDesc.
Shutter1/10s, 0.9sExposure time. [s]
FNumberF3.2, F5.6F-stop of lens [no unit]
MTR1f9.2mm, f28.0mmFocal length of lens [mm]
ExpBiasExp.bias-2Exposure bias value of taking picture [no unit]
LightSWbAuto, WbDaylight, Wb5500KLight source: white balance setting
FlashFlashOnFlash was used or not
TypeSR83, DCPTModel number of digicam
QualitySHQ, HQImage quality mode
TimeDate2000/07/13 22:25:00Date/Time of original image taken


History

v0.7 2001/01/13

v0.6 2000/10/15

v0.5 2000/09/18

v0.4 2000/08/03

v0.3 2000/07/13

v0.2 2000/07/05

v0.1 2000/06/30


Copyright and Notice



TsuruZoh Tachibanaya
t s u r u z o h @ b a . w a k w a k . c o m
http://park2.wakwak.com/~tsuruzoh/


Rota.exe README Copyright(c) TsuruZoh Tachibanaya