ExifTool Forum

ExifTool => Developers => Topic started by: Guzman on May 13, 2015, 03:05:26 PM

Title: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Guzman on May 13, 2015, 03:05:26 PM
Hello.

I need remove all EXIF Metadata from PEF Files (Pentax RAW File)

exiftool -EXIF:All= RAW_PENTAX_K100.PEF

IFD0, IFD1 and IFD2 No deleted

You can download PEF files from:
http://www.rawsamples.ch/index.php/en/pentax

Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: StarGeek on May 13, 2015, 04:23:47 PM
According to Wikipedia (https://en.wikipedia.org/wiki/Raw_image_format#File_contents), the PEF format is based upon TIF, so the info in FAQ 7 (http://www.exiftool.org/faq.html#Q7) would probably apply.
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Phil Harvey on May 13, 2015, 06:19:38 PM
I would not recommend deleting all metadata from RAW formats because the maker notes carry information that is required for the proper rendering of the image.

From the application documentation (https://exiftool.org/exiftool_pod.html):

       exiftool -all= dst.jpg
            Delete all meta information from an image.  Note: You should NOT
            do this to RAW images (except DNG) since proprietary RAW image
            formats often contain information in the makernotes that is
            necessary for converting the image.

- Phil
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Guzman on May 14, 2015, 02:58:04 AM
OK, thanks for the information
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Guzman on May 14, 2015, 03:17:24 AM
But if I run this command on RAW images (No DNG):

exiftool -EXIF:All= RAW_PENTAX_K100.PEF

Can it deleting information necessary to converting the image?
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Phil Harvey on May 14, 2015, 07:47:42 AM
Yes.  But the way to tell for yourself is to try it, then try to view the raw image.

For raw images, I would recommend something more like this:

exiftool -xmp:all= -iptc:all= -artist= -copyright= -imagedescription= RAW_PENTAX_K100.PEF

- Phil
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Guzman on May 18, 2015, 06:04:47 AM
I need to delete all EXIF metadata except ImageDescription

C:\Users\Documents>exiftool -EXIF:All= -EXIF:ImageDescription="Detalle de la cantera de malaga" Chrysanthemum.jpg
    1 image files updated

C:\Users\Documents>exiftool -EXIF:All -s Chrysanthemum.jpg
ImageDescription                : Detalle de la cantera de malaga
XResolution                     : 96
YResolution                     : 96
ResolutionUnit                  : Unknown (4)
YCbCrPositioning                : Centered

Why is not deleted: XResolution, YResolution, ResolutionUnit and YCbCrPositioning  Meta Information?

Best Regards.

Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Phil Harvey on May 18, 2015, 06:58:12 AM
Quote from: Guzman on May 18, 2015, 06:04:47 AM
Why is not deleted: XResolution, YResolution, ResolutionUnit and YCbCrPositioning  Meta Information?

Because it is not EXIF.  See FAQ 3 (https://exiftool.org/faq.html#Q3) if you need help with this.

- Phil
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Guzman on May 18, 2015, 07:13:59 AM
I Dont understand.

I remove All EXIF information:
C:\Users\drejonc\Documents>exiftool -EXIF:All= Chrysanthemum.jpg
    1 image files updated

I list All Exif Information, result empty:
C:\Users\drejonc\Documents>exiftool -EXIF:All -a -G1 -s Chrysanthemum.jpg

Insert imagedescription metadata
C:\Users\drejonc\Documents>exiftool -EXIF:imagedescription="Detalle de la cantera de malaga" Chrysanthemum.jpg
    1 image files updated

List EXIF Metadata
C:\Users\drejonc\Documents>exiftool -EXIF:All -a -G1 -s Chrysanthemum.jpg
[IFD0]          ImageDescription                : Detalle de la cantera de malaga
[IFD0]          XResolution                     : 96
[IFD0]          YResolution                     : 96
[IFD0]          ResolutionUnit                  : Unknown (4)
[IFD0]          YCbCrPositioning                : Centered

Why added this meta information:?
[IFD0]          XResolution                     : 96
[IFD0]          YResolution                     : 96
[IFD0]          ResolutionUnit                  : Unknown (4)
[IFD0]          YCbCrPositioning                : Centered

Regards.
Title: Re: Remove EXIF from PEF Files (Pentax RAW File)
Post by: Phil Harvey on May 18, 2015, 07:45:48 AM
Sorry.  I assumed you were looking at the JFIF information.  This wasn't the problem, but JFIF was involved.

When new EXIF is added, certain mandatory tags must be written. (See the EXIF tags documentation.)

ExifTool is taking the values of these mandatory tags from the JFIF information, which you haven't deleted.  (Thisis why the ResolutionUnit gets a funny value.)

- Phil