Creating Image from Atoms

Started by tadej, May 22, 2014, 02:42:52 AM

Previous topic - Next topic

tadej

Hi Phil,

I have just found intersting article here:
http://keyj.emphy.de/exif-orientation-rant/
it is all about orientation TAG issue.

I would like to solve it once for all for the users of my software.

Here is the scenario.

1.
From "normal" or raw images I already extract preview image if available and save/convert it to 100% quality jpg.
If preview is not available raw image is processed and 100% quality jpeg is created.
User has an option to process raw images regardless the state of preview image.

2.
I extract Orientation information from image if available.
A small issue here is that I have found that there is Transformation tag as well.
From your documentation I understand that
Orientation IFD0 = Transformation IFD0 +1
Is this another EXIF misuse by big brand names or what ?

Eventually I end up with some OrientTransf information upon which I rotate image and save it as 100% quality jpg image.
(I am aware that from purist point of view some quality is lost here but for my mission is negligible).

3. User sees image displayed and if he/she is not happy rotation tool is available.

4. And now I would like to create new image from scratch where:
  • image from step 1. is used,

  • thumbnail image is created (just not sure about typical size of thumbnail image - can you enlighten me a bit)

  • Thumbnail image is inserted,

  • Relevant EXIF and GPS tags are written with Orientation value IFDO = 1


The questions:

  • Is there a command in EXIFtool to insert Thumbnail image in existing image ?
  • Is there a command in EXIFtool to set Thumbnail Orientation tag to 1 ?



Best,
Dusan












Phil Harvey

Quote from: tadej on May 22, 2014, 02:42:52 AM
Orientation IFD0 = Transformation IFD0 +1

I don't understand what you mean by this.

QuoteIs there a command in EXIFtool to insert Thumbnail image in existing image ?

No.

QuoteIs there a command in EXIFtool to set Thumbnail Orientation tag to 1 ?

For a JPEG image, this is:

exiftool -ifd1:orientation#=1 FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

Quoteexiftool -ifd1:orientation#=1 FILE

that is fine.

Is there a command in EXIFtool to insert Thumbnail image in existing image ?
No


Any chance that this happens at some point.

The idea I have (had) here is:
  • extract original image, preview image and thumbnailimage.
  • Rotate each as appropriate.
  • Compose image from three images (if preview images is maller resolution) otherwise just original image and thumbnailimage.
  • Write orientation tags = 1 for all images in the composition.
This will force any software which displays images to display correctly.

Regards,
Dusan

Phil Harvey

Quote from: tadej on May 22, 2014, 11:21:09 AM
Is there a command in EXIFtool to insert Thumbnail image in existing image ?
No


Any chance that this happens at some point.

I may have misunderstood.  There is no way to generate a thumbnail image, and there never will be.  But you can write any other file into the thumbnail image:

exiftool "-thumbnailimage<=THUMBFILE" FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

Hi Phil,
that is just fine.

There is no way to generate a thumbnail image, and there never will be.  But you can write any other file into the thumbnail image:

If I can write an image to the place where Thumbnali should be then I understand the answer is yes and not there never will be .
Am I missing something here.
Dusan

Phil Harvey

No, as I said I think I misunderstood.  ExifTool doesn't do image manipulations, so you must create the thumbnail file with some other software.  But after you do this, you can use ExifTool to insert the thumbnail into a JPEG file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej