ExifTool Forum

General => Metadata => Topic started by: lorents on October 12, 2010, 04:07:15 AM

Title: Structure JPEG
Post by: lorents on October 12, 2010, 04:07:15 AM
Good afternoon! I have some questions connected to structure JPEG. I ask to help to understand.
1. What for in JPEG are necessary markers APP# (http://www.exiftool.org/TagNames/JPEG.html), and whether it is possible to delete them
2. Studied function "File Info" in Photoshop and I had a question. In section "File Info" there are "raw data", what it for the data?
3. Whether I have a JPEG-picture in color model CMYK it is possible to save it in RGB but so that a picture it is pixel-by-pixel hasn't changed.
4. Whether it is possible through ExifTool to edit meta data in JPEG?
Thanks for attention!
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 08:06:37 AM
Quote from: lorents on October 12, 2010, 04:07:15 AM
1. What for in JPEG are necessary markers APP# (http://www.exiftool.org/TagNames/JPEG.html), and whether it is possible to delete them

You can delete them all with exiftool -all=.  Or individual APP segments are deleted by deleting the metadata they contain.  (ie. -exif:all= deletes the EXIF APP1 segment)

Quote
2. Studied function "File Info" in Photoshop and I had a question. In section "File Info" there are "raw data", what it for the data?

I have no idea what you are talking about.

Quote
3. Whether I have a JPEG-picture in color model CMYK it is possible to save it in RGB but so that a picture it is pixel-by-pixel hasn't changed.

I don't know if this is possible.  ExifTool won't do this though.

Quote
4. Whether it is possible through ExifTool to edit meta data in JPEG?

Yes.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 09:01:28 AM
Thanks that have answered.
Generally ExifTool allows to convert images from CMYK in RGB?
Forgive, I not much not in a subject, ExifTool support editing Chunk in PNG.
And still where it is possible to find on a site help to us account ExifTool connected with PNG and JPEG, I unfortunately couldn't find, I have found only
http://www.exiftool.org/TagNames/index.html
And what for markers APP # are necessary?
Phil Harvey, ExifTool the excellent program, I hope it and will develop further
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 10:25:05 AM
ExifTool does not edit image data, so it can not be used to convert from CMYK to RGB.

None of the APP markers are necessary.

It seems you may also be referring to the APP profile chunks in PNG images.  These are completely undocumented as far as I know, but may be written by ImageMagic when converting from JPEG to PNG, so ExifTool supports reading/writing these chunks.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 10:47:14 AM
I not absolutely have understood you, APP it is possible to delete safely?

Don't prompt, where on a site help ExifTool?
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 11:48:04 AM
The APP segments only contain metadata, so deleting them is fairly safe.  The only metadata that affects the way the image is drawn is orientation information and color profile information.  If you can live without these then it is safe to delete the APP segments.

There is no general help with metadata like this on the ExifTool site.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 11:48:31 AM
Whether it is possible through ExifTool to edit Chunk in PNG also, as through program TweakPNG (http://entropymine.com/jason/tweakpng/)
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 11:52:18 AM
Quote from: Phil Harvey on October 12, 2010, 11:48:04 AM
The only metadata that affects the way the image is drawn is orientation information and color profile information.
What it is meta data?

Phil Harvey, you me have very strongly helped, many thanks
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 12:07:51 PM
Quote from: lorents on October 12, 2010, 11:52:18 AM
What it is meta data?

See the Wikipedia metadata article (http://en.wikipedia.org/wiki/Metadata) for a good description.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 12:18:38 PM
I meant, not that such the metadata.
And what are better be not to deleting?

Forgive for my bad English
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 01:25:35 PM
Quote from: lorents on October 12, 2010, 12:18:38 PM
And what are better be not to deleting?

It depends on what is important to you.  All metadata is important to me, so I don't delete any of it.  I like to be able to tell my camera settings when looking at my images.  But many people delete all metadata from an image if they are worried about privacy and/or file size, especially when sharing images on the internet.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 01:30:31 PM
Thanks, have very strongly helped today.

Whether it is possible through ExifTool to edit Chunk in PNG also, as through program TweakPNG (http://entropymine.com/jason/tweakpng/)
Title: Re: Structure JPEG
Post by: Phil Harvey on October 12, 2010, 02:10:10 PM
Yes, ExifTool will edit metadata chunks in PNG images.

- Phil
Title: Re: Structure JPEG
Post by: lorents on October 12, 2010, 02:19:28 PM
Phil Harvey, thanks that all my questions have answered.
And thanks for your program, now I her admirer

Once again forgive, for my bad English
Title: Re: Structure JPEG
Post by: lorents on November 05, 2010, 03:16:56 PM
Good evening!
Prompt, please, as from ExifTool it will be possible to make the separate program which to work only with JPEG?
Title: Re: Structure JPEG
Post by: Phil Harvey on November 05, 2010, 03:47:47 PM
It would be possible to to do this, but some modification of ExifTool.pm would be required to disable the other file types.

- Phil
Title: Re: Structure JPEG
Post by: lorents on November 05, 2010, 03:54:43 PM
It is possible more in detail as it to make?
Title: Re: Structure JPEG
Post by: Phil Harvey on November 05, 2010, 06:31:45 PM
You could start by just removing all other entries from the %fileTypeLookup hash and deleting the corresponding modules from lib/Image/ExifTool (see the %moduleName lookup to get the module names for each file type).

Then you would have to run lots and lots of tests to see if the JPEG parsing relied on anything you removed.

- Phil
Title: Re: Structure JPEG
Post by: lorents on November 06, 2010, 04:25:50 AM
Clearly, thanks I will try.
Title: Re: Structure JPEG
Post by: lorents on February 18, 2012, 03:29:09 PM
Good afternoon!
Prompt please how it is possible to remove only certain markers?

Title: Re: Structure JPEG
Post by: Phil Harvey on February 18, 2012, 06:44:02 PM
The syntax is

exiftool -TAG= ...

See the FAQ number 2 (https://exiftool.org/faq.html#Q2) for help determining the TAG names.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 02:34:06 AM
And where it is possible to receive the list about all possible TAG names.

Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 03:02:35 AM
And still, how to make that exiftool didn't create a file * _original
Title: Re: Structure JPEG
Post by: BogdanH on February 19, 2012, 04:07:05 AM
Hi,

You can see list (and description) of tags here:
http://www.exiftool.org/TagNames/EXIF.html
http://www.exiftool.org/TagNames/IPTC.html
http://www.exiftool.org/TagNames/XMP.html

To get list of tags from ExifTool, you can use command(s):
exiftool -list -exif:all
exiftool -list -iptc:all
exiftool -list -xmp:all


To prevent creating *_original files, use:
exiftool -overwrite_original -exif:artist="My name" myPhoto.jpg

Bogdan
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 04:50:43 AM
Thanks for an explanation.
It is possible to receive the complete list of those elements which leave at-all =?

Whether also it is possible an example of removal of a certain element from EXIF Tags?

BogdanH, you speak Russian?
Title: Re: Structure JPEG
Post by: BogdanH on February 19, 2012, 05:12:47 AM
Hi,

If command:
exiftool -all= *.*
-is executed on jpg files, then all metadata will be deletet in file. If the same command is executed on tiff based files (raw), then not all metadata will be deleted, because image data is part of metadata.

To delete particular tag in exif, you write:
exiftool -exif:Artist= myPhoto.jpg
or to delete a group of tags inside exif:
exiftool -exif:ExifIFD= myPhoto.jpg
or you can combine, for example:
exiftool -exif:Artist= -GPS:All= myPhoto.jpg

No, even my name is Slavic, I don't speak Russian -but I did visit Moscow in 2008 :)

Bogdan
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 05:50:07 AM
When I use exiftool-all = for JPEG all metadata leaves.
And where it is possible to find the complete list of the metadata?
-GPS:all=
-EXIF:all=
-IPTC:all=
-XMP:all=
-JFIF:all=
-ICC_Profile:all=
Title: Re: Structure JPEG
Post by: BogdanH on February 19, 2012, 05:57:32 AM
That is correct:
exiftool -exif:All= myPhoto.jpg
That is wrong:
exiftool -exif:All = myPhoto.jpg
                  ^-space!


All metadata related info can be found on ExifTool homepage:
http://www.exiftool.org/
-look at the top of the page: EXIF, GPS, IPTC, XMP,....

Bogdan
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 06:25:48 AM
And there is no simply a list of the metadata which it is possible to delete from JPEG using exiftool?
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 06:35:36 AM
And it is possible to make the version exiftool которя works only for removal of the metadata from the metadata from JPEG?
Also can eat the separated script for this purpose?
Title: Re: Structure JPEG
Post by: BogdanH on February 19, 2012, 06:46:57 AM
Hi,

I am afraid, we have a language problem here...
As said above, with ExifTool, you can delete any metadata tag from jpg file. If you wish to delete all exif tags in jpg files only, then you can use command like:
exiftool -exif:all= -ext jpg d:\test\photo
-this will delete complete exif metadata from jpg files in d:\test\photo.

Bogdan
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 07:03:25 AM
Look, I want to receive the complete list tags which can be removed from JPEG using ExifTool
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 08:57:23 AM
And there are other analogs ExifTool for removal of the metadata from JPEG, dirty jhead
Title: Re: Structure JPEG
Post by: Phil Harvey on February 19, 2012, 09:32:07 AM
Hi Lorents,

ExifTool can delete all metadata from a JPEG image.  The complete list of all metadata tags recognized by ExifTool is given by the command:

exiftool -list

However, many of these are for formats other than JPEG.  Also, there are tags not in this list that will also be removed with -all= (any unknown tags).

I think that jhead may also be able to remove all metadata from a JPEG image, but I don't know for sure.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 09:55:12 AM
Prompt, how it is possible to remove all metadata from the image, and to leave only marker APP14?

Title: Re: Structure JPEG
Post by: Phil Harvey on February 19, 2012, 10:39:44 AM
Currently, ExifTool can't do this.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 10:49:08 AM
There are other appendices, for removal of the metadata from JPEG?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 19, 2012, 11:02:43 AM
I am only aware of exiftool and jhead, but I'm sure you will be able to find others.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 11:50:46 AM
I have an image



If it to optimize using jhead -du the image looks so



Who doesn't know as it to avoid?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 19, 2012, 01:12:15 PM
This is very interesting.  I didn't know that deleting APP14 could affect the image.  Maybe ExifTool shouldn't be deleting this when deleting all metadata.  I will look into this.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 19, 2012, 01:23:49 PM
I just have noticed today it, I sit and I think what to do
Has noticed it and on images RGB and CMYK, on YCbCr all is normal.

Whether could write you on perl (or in any other language) script which could delete the certain metadata from JPEG?

Let's admit so
GPS
EXIF
IPTC
XMP
ICC_Profile
Comment
Other metadata

To make analog jhead, but with a wide choice of the metadata.
Title: Re: Structure JPEG
Post by: lorents on February 20, 2012, 09:41:35 AM
Good afternoon Phil Harvey!

Could find nothing in the Internet, on removal of the metadata. Whether there is a chance, what you write a separate script on removal of the metadata from JPEG?

For me it is very important that the script could work through cmd and supported RGB, CMYK and YCbCr.
Title: Re: Structure JPEG
Post by: Phil Harvey on February 20, 2012, 03:27:32 PM
I have updated ExifTool so that it doesn't delete the APP14 Adobe segment by default when deleting all metadata.  This segment can be deleted if necessary with -adobe:all= or -adobe=, or extracted or copied as a block with the new "Adobe" tag.

ExifTool 8.79 has just been released with this new feature.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 20, 2012, 03:57:16 PM
Excellent work!

Wanted to learn into the account of my request, there is a chance, what you will make a separate script on perl on removal of the metadata?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 20, 2012, 07:12:44 PM
Hi Lorents,

I have a script that you could modify to do this if you want.  It removes various application segments from a JPEG image:

#!/usr/bin/perl -w
my $help = <<_END_;
#
# File:         clean_jpg
#
# Description:  Remove EXIF and PhotoShop junk from JPG files or directories
#
# Syntax:       clean_jpg [OPTIONS] FILE/DIR [...]
#
# Options:      -a     - preserve all meta information except preview trailer
#               -d     - dummy mode (doesn't actually change the file)
#               -e     - preserve EXIF APP1 information
#               -o     - preserve other meta information (all but EXIF, XMP, PS)
#               -p     - preserve Photoshop APP13 information (includes IPTC)
#               -r     - recursively process sub-directories
#               -i DIR - ignore specified directory
#               -v     - verbose
#               -x     - preserve XMP APP1 information
#
# Revisions:    10/20/03 - PH Created
#               12/22/03 - PH Allow multiple filenames to be specified
#               12/24/03 - PH Added dummy mode.
#                          Remove all 0xe0-f markers (not just 0xe1,2,d,e,f)
#               01/21/04 - PH Added -e option
#               11/30/04 - PH Clean up unpack calls
#               01/31/05 - PH Remove multiple 0xff's in segment headers
#               04/09/05 - PH Changed -e option to -a, and added -e, -o, -p and
#                          -x options
#               04/15/05 - PH Fixed problem where specified information wasn't
#                          being preserved if entire directory is cleaned
#               03/20/09 - PH Also remove COM segment
#
_END_
#
# Legal:        Copyright (c) 2003-2009 Phil Harvey
#               You are free to use/modify this script for non-profit
#               purposes.  Not responsible for loss or damages.
#
#               Mail problems/comments to philharvey66 at gmail.com
#
use strict;
require 5.002;

sub CleanDir($;$);
sub CleanJpg($;$);

my @files;
my $recurse = 0;
my $verbose;
my $dummy;
my @ignore;
my $count = 0;
my $count_ok = 0;
my $count_dir = 0;
my $cleaned_bytes = 0;
my $preserve_flags = 0; # 1=exif, 2=xmp, 4=photoshop, 8=other

my $arg;
while ($arg = shift)
{
    if ($arg =~ /^-/) {
        for (my $i=1; ($_=substr $arg, $i, 1); ++$i) {
            /a/  and $preserve_flags |= 0xff, next;
            /d/  and $dummy = 1, next;
            /e/  and $preserve_flags |= 0x01, next;
            /i/  and push(@ignore,shift), next;
            /o/  and $preserve_flags |= 0x08, next;
            /p/  and $preserve_flags |= 0x04, next;
            /r/  and $recurse = 1, next;
            /v/  and $verbose = 1, next;
            /x/  and $preserve_flags |= 0x02, next;
            print "Unknown option $_\n";
            exit 1;
        }
    } else {
        push @files, $arg;
    }
}

unless (@files) {
    print $help;
    exit 1;
}

my $filename;
foreach $filename (@files) {
    if (-d $filename) {
        CleanDir($filename, $preserve_flags);
    } elsif (-e $filename) {
        my $result = CleanJpg($filename, $preserve_flags);
        if ($result > 1) {
            ++$count;
        } elsif ($result > 0) {
            ++$count_ok;
        }
    } else {
        die "Can't open $filename\n";
    }
}

if ($count or $count_ok or $count_dir>1) {
    printf("%5d directories scanned\n", $count_dir) if $count_dir > 1;
    printf("%5d JPG files cleaned\n", $count) if $count;
    printf("%5d JPG files already clean\n", $count_ok) if $count_ok;
    if ($cleaned_bytes >= 102400000) {
        printf("%5d MB saved\n", $cleaned_bytes / (1024*1024));
    } elsif ($cleaned_bytes >= 100000) {
        printf("%5d KB saved\n", $cleaned_bytes / 1024);
    } else {
        printf("%5d bytes saved\n", $cleaned_bytes);
    }
    print "But this was dummy mode, so nothing was changed\n" if $dummy;
} else {
    print "Nothing to do.\n";
}

sub CleanDir($;$)
{
    my $dir = shift;
    my $keep_flags = shift || 0;
    opendir(DIR_HANDLE, $dir) or die "Error opening directory $dir\n";
    my @file_list = readdir(DIR_HANDLE);
    closedir(DIR_HANDLE);
   
    ++$count_dir;
   
    my $file;
    foreach $file (@file_list) {
        my $path = "$dir/$file";
        if (-d $path) {
            next if $file =~ /^\./; # ignore dirs starting with "."
            next if grep /^$file$/, @ignore;
            $recurse and CleanDir($path, $keep_flags);
            next;
        }
        if ($file =~ /\.jpg$/i) {
            my $result = CleanJpg($path, $keep_flags);
            if ($result > 1) {
                ++$count;
            } elsif ($result > 0) {
                ++$count_ok;
            }
        }
    }
}

# rewrite a jpg file, removing EXIF data unless specified
# Inputs: 0) file name, 1) preserve flags (keep 1=exif, 2=xmp, 4=photoshop, 8=other)
# - returns 0 on error, 1 if nothing done, 2 if any junk was removed
# - also removes Canon preview image
sub CleanJpg($;$)
{
  my $infile = shift;
  my $keep_flags = shift || 0;
  my $outfile = '';
  my $success = 0;
  my $found_junk = 0;
  my ($s,$length,$buff);
  my ($ch,$data,$ord_ch);
 
  $verbose and print "File: $infile\n";
 
  open(JPG_IN,$infile) or return $success;
  binmode( JPG_IN );

  # create name of temporary file in same directory
  if ($infile =~ /(.*\/)/) {
    $outfile = $1;
  }
  $outfile .= "icat_CleanJpg.tmp";
 
  unless (open(JPG_OUT,">$outfile")) {
    close(JPG_IN);
    return $success;
  }
  binmode( JPG_OUT );
 
  # set input record separator to 0xff (the JPEG marker) to make reading quicker
  my $oldsep = $/;
  $/ = "\xff";

  if (read(JPG_IN,$s,2)==2 and $s eq "\xff\xd8" and print JPG_OUT $s) {
    # read file until we reach an end of image (EOI)
    Marker: for (;;) {
      # Find next marker (JPEG markers begin with 0xff)
      $data = <JPG_IN>;
      defined($data) or last;
      chomp $data;  # remove 0xff
      print JPG_OUT $data or last;
      # JPEG markers can be padded with unlimited 0xff's
      for (;;) {
        read(JPG_IN, $ch, 1) or last Marker;
        $ord_ch = ord($ch);
        last if $ord_ch != 0xff; # exit loop before printing marker
        ++$cleaned_bytes;
      }
      my $hdr = "\xff" . $ch;   # segment header
      # Now, $ord_ch is the value of the marker.
      if (($ord_ch >= 0xc0) && ($ord_ch <= 0xc3)) {
        # this is an image block
        read(JPG_IN, $buff, 7) == 7 or last;
        print JPG_OUT $hdr,$buff or last;
      # handle stand-alone markers 0x01 and 0xd0-0xd7
      # (and the non-marker 0x00, which follows an 0xff if it exists in data)
      } elsif ($ord_ch==0x00 or $ord_ch==0x01 or ($ord_ch>=0xd0 and $ord_ch<=0xd7)) {
        print JPG_OUT $hdr or last;
      } elsif ($ord_ch==0xd9) { # end of image (EOI)
        print JPG_OUT $hdr and $success = 1;
        my $curpos = tell(JPG_IN);
        seek(JPG_IN, 0, 2);    # seek to end of file
        my $preview_size = tell(JPG_IN) - $curpos;
        if ($preview_size) {
            $verbose and printf("  Removed preview image (%d bytes)\n", $preview_size);
            $found_junk = 1;
            $cleaned_bytes += $preview_size;
        }
        last;
      } else {
        # We **MUST** skip variables, since FF's within variable names are
        # NOT valid JPEG markers
        read(JPG_IN, $s, 2) == 2 or last;
        $length = unpack("n",$s);
        last if $length < 2;
        read(JPG_IN, $buff, $length-2) == $length-2 or last;
        # print out this field unless we are ignoring it
        my $remove;
        if ($ord_ch >= 0xe0 and $ord_ch <= 0xef) {
          if ($ord_ch==0xe1 and $buff=~/^Exif\0\0/) {
            # EXIF APP1 segment
            $remove = 1 unless $keep_flags & 0x01;
          } elsif ($ord_ch==0xe1 and $buff=~/^http:\/\/ns.adobe.com\/xap\/1.0\/\0/) {
            # XMP APP1 segment
            $remove = 1 unless $keep_flags & 0x02;
          } elsif ($ord_ch==0xed and $buff=~/^Photoshop 3.0\0/) {
            # Photoshop APP13 segment
            $remove = 1 unless $keep_flags & 0x04;
          } else {
            # Other application segment
            $remove = 1 unless $keep_flags & 0x08;
          }
        } elsif ($ord_ch == 0xfe) {
            # COM segment
            $remove = 1 unless $keep_flags & 0x08;
        }
        if ($remove) {
          $verbose and printf("  Marker 0x%x: %5d bytes -- Cleaned\n", $ord_ch, $length);
          $found_junk = 1;
          $cleaned_bytes += $length + 2;
        } else {
          $verbose and printf("  Marker 0x%x: %5d bytes -- Kept\n", $ord_ch, $length);
          print JPG_OUT $hdr,$s,$buff or last;
        }
      }
    }
  }
  $/ = $oldsep;     # return separator to original value
  close(JPG_IN);
  close(JPG_OUT) or $success = 0;
 
  if ($success and $found_junk and not $dummy) {
    unless (rename($outfile,$infile)) {
      $success = 0;
      unlink($outfile);
    }
  } else {
    unlink($outfile);
  }
  $success or $found_junk = 0;

  return $success + $found_junk;
}


# end


- Phil
Title: Re: Structure JPEG
Post by: lorents on February 21, 2012, 01:39:01 AM
And you don't have script which could remove the following metadata:
xmp
exif
iptc
jfif
app14
comment
icc_profile
Other metadata
Title: Re: Structure JPEG
Post by: Phil Harvey on February 21, 2012, 07:19:22 AM
Both exiftool and the script I posted above will remove these.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 21, 2012, 01:41:26 PM
Look, to me скритп it is necessary for my project - Image Catalyst (http://forum.ru-board.com/topic.cgi?forum=4&topic=4263), and here now I search for a way to replace jhead

Therefore I search for an integral script for removal of the metadata from JPEG

Such question, and it is possible using exiftool to remove all metadata except exif?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 21, 2012, 02:14:18 PM
Quote from: lorents on February 21, 2012, 01:41:26 PM
Such question, and it is possible using exiftool to remove all metadata except exif?

Yes.
Title: Re: Structure JPEG
Post by: lorents on February 21, 2012, 02:20:05 PM
It is possible more in detail, how?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 21, 2012, 02:28:19 PM
exiftool -all= --exif:all FILE
Title: Re: Structure JPEG
Post by: lorents on February 21, 2012, 02:53:52 PM
Thanks!

And there are no chances, what you separate from exiftool function of removal of the metadata for JPEG?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 21, 2012, 02:54:55 PM
Aside from the script I posted, I have no plans to write another script that only removes metadata.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 21, 2012, 03:42:49 PM
It is a pity, if will change the mind, let know.

exiftool the excellent program, I wish the further development.
Title: Re: Structure JPEG
Post by: lorents on February 22, 2012, 02:45:09 PM
Tell me, what removes the tags Photoshop in ExifToolGUI?
Title: Re: Structure JPEG
Post by: BogdanH on February 22, 2012, 03:18:02 PM
This option executes command
exiftool -photoshop:all=
-which deletes photoshop metadata section in selected files (see description here: http://www.exiftool.org/TagNames/Photoshop.html

Bogdan
Title: Re: Structure JPEG
Post by: lorents on February 22, 2012, 03:47:54 PM
thanks
Title: Re: Structure JPEG
Post by: lorents on February 23, 2012, 05:22:27 AM
Phil Harvey good afternoon!
I have some questions, you couldn't answer them:
1. How to remove the comment from JPEG
2. How to apply date and time of updating of a file from EXIF
3. Whether it is possible to receive the unpacked version exiftool since I lose a lot of time for unpacking exiftool, and whether it is possible then to clean from exiftool scripts which aren't responsible for work with JPEG?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 23, 2012, 07:21:07 AM
Quote from: lorents on February 23, 2012, 05:22:27 AM
1. How to remove the comment from JPEG

-comment=

Quote2. How to apply date and time of updating of a file from EXIF

"-filemodifydate<datetimeoriginal"

Quote3. Whether it is possible to receive the unpacked version exiftool since I lose a lot of time for unpacking exiftool,

You can install Perl and run the Perl version if you want.  All versions are available from the exiftool home page.

Quoteand whether it is possible then to clean from exiftool scripts which aren't responsible for work with JPEG?

You are free to edit ExifTool to suit your needs.  Full source code is included in all versions.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 23, 2012, 11:05:05 AM
How it is possible to make removal of all metadata except the comment?

Whether could make you an example of work ExifTool with ActivePerl, I will be very grateful? At the same time to remove all superfluous of ExifTool?

Me following functions interest
-all=
-exif:all=
-iptc:all=
-xmp:all=
-icc_profile:all=
-photoshop:all=
-comment=

--exif:all
--iptc:all
--xmp:all
--icc_profile:all
--photoshop:all
--comment

-overwrite_original

"-filemodifydate<datetimeoriginal"
Title: Re: Structure JPEG
Post by: Phil Harvey on February 23, 2012, 11:32:25 AM
Quote from: lorents on February 23, 2012, 11:05:05 AM
How it is possible to make removal of all metadata except the comment?

I think it is time you read the documentation (https://exiftool.org/exiftool_pod.html).  Look for "--TAG".

QuoteWhether could make you an example of work ExifTool with ActivePerl, I will be very grateful? At the same time to remove all superfluous of ExifTool?

"Aside from the script I posted, I have no plans to write another script that only removes metadata."

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 23, 2012, 12:13:41 PM
I to tell the truth, and haven't understood as to remove all data from JPEG, except the comment. Tried so - comment, but hasn't helped.
Title: Re: Structure JPEG
Post by: Phil Harvey on February 24, 2012, 07:14:12 AM
Try this:

exiftool -all= -tagsfromfile @ -comment FILE

as per the documentation.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 24, 2012, 07:32:59 AM
Thanks big!

Also it is possible to ask last question
Than differ then

-all= -tagsfromfile @ -exif -xmp

From

-all= -exif:all -xmp:all
Title: Re: Structure JPEG
Post by: Phil Harvey on February 24, 2012, 08:49:11 AM
Quote from: lorents on February 24, 2012, 07:32:59 AM
Than differ then

-all= -tagsfromfile @ -exif -xmp

From

-all = -exif:all -xmp:all

Do you mean -all= --exif:all --xmp:all ?

The first command is slower because it extracts the EXIF and XMP from the file then writes it back again, replacing the original EXIF and XMP.  My version of the 2nd command deletes everything except the EXIF and XMP.

- Phil
Title: Re: Structure JPEG
Post by: lorents on February 24, 2012, 09:00:50 AM
Whether correctly I have understood you, it is better to use a command

-all= -exif:all -xmp:all

It works faster?
Title: Re: Structure JPEG
Post by: Phil Harvey on February 24, 2012, 09:22:24 AM
-all= --exif:all --xmp:all

Yes.
Title: Re: Structure JPEG
Post by: lorents on February 24, 2012, 09:44:43 AM
Thank you very much!