Author Topic: Creating Image from Atoms  (Read 2337 times)

tadej

  • Full Member
  • ***
  • Posts: 34
Creating Image from Atoms
« on: May 22, 2014, 02:42:52 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: Creating Image from Atoms
« Reply #1 on: May 22, 2014, 08:02:20 AM »
Orientation IFD0 = Transformation IFD0 +1

I don't understand what you mean by this.

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

No.

Quote
Is 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

  • Full Member
  • ***
  • Posts: 34
Re: Creating Image from Atoms
« Reply #2 on: May 22, 2014, 11:21:09 AM »
Quote
exiftool -ifd1:orientation#=1 FILE

that is fine.

Code: [Select]
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: Creating Image from Atoms
« Reply #3 on: May 22, 2014, 11:25:39 AM »
Code: [Select]
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

  • Full Member
  • ***
  • Posts: 34
Re: Creating Image from Atoms
« Reply #4 on: May 22, 2014, 01:06:21 PM »
Hi Phil,
that is just fine.

Code: [Select]
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: Creating Image from Atoms
« Reply #5 on: May 22, 2014, 01:16:11 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

  • Full Member
  • ***
  • Posts: 34
Re: Creating Image from Atoms
« Reply #6 on: May 22, 2014, 01:39:57 PM »
Haven, thanks :).