Removing Pixel Scale and Model Tie Point

Started by Kofi, May 17, 2021, 04:59:10 AM

Previous topic - Next topic

Kofi

Hi all,

I am trying to remove PixelScale and ModelTiePoint tags from IFD0 section of Metadata. Tried with -PixelScale= -ModelTiePoint= but got message saying these tags are not writable....

see extracted metadata from ExifTool

---- ExifTool ----
ExifTool Version Number         : 12.12
---- System ----
File Name                       : dsm.tif
Directory                       : C:/Users/paul.pelletier/Downloads/marecaP3Pro
File Size                       : 18 MiB
File Modification Date/Time     : 2021:05:14 17:24:33-05:00
File Access Date/Time           : 2021:05:14 17:26:34-05:00
File Creation Date/Time         : 2021:05:14 16:36:56-05:00
File Permissions                : rw-rw-rw-
---- File ----
File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
---- IFD0 ----
Image Width                     : 3646
Image Height                    : 3493
Bits Per Sample                 : 32
Compression                     : LZW
Photometric Interpretation      : BlackIsZero
Samples Per Pixel               : 1
Planar Configuration            : Chunky
Tile Width                      : 256
Tile Length                     : 256
Tile Offsets                    : (Binary data 1737 bytes, use -b option to extract)
Tile Byte Counts                : (Binary data 1274 bytes, use -b option to extract)
Sample Format                   : Float
S Min Sample Value              : 315.625122070313
S Max Sample Value              : 339.354248046875
Pixel Scale                     : 0.0366757999999869 0.0366758000001102 0
Model Tie Point                 : 0 0 0 640738.884289963 4604970.83733696 0

GDAL No Data                    : -32767
---- Composite ----
Image Size                      : 3646x3493
Megapixels                      : 12.7

Is there a way to remove these tags?

StarGeek

What is the exact message exiftool gives?

I was able to add and remove both of those tags using both the current version and ver 12.00 of exiftool
C:\>exiftool -P -overwrite_original -PixelScale=".1 .2 .3" -ModelTiePoint=".4 .5 .6"  y:/!temp/Testtest.tif
    1 image files updated

C:\>exiftool -g1 -a -s -PixelScale -ModelTiePoint y:/!temp/Testtest.tif
---- IFD0 ----
PixelScale                      : 0.1 0.2 0.3
ModelTiePoint                   : 0.4 0.5 0.6

C:\>exiftool -P -overwrite_original -PixelScale= -ModelTiePoint= y:/!temp/Testtest.tif
    1 image files updated

C:\>exiftool -g1 -a -s -PixelScale -ModelTiePoint y:/!temp/Testtest.tif

C:\>
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Kofi

#2
Thanks StarGeek,

it works when I specify a file or directory but originally I used following batch:
exiftool -P -overwrite_original "-geotiff*=" -PixelScale= -ModelTiePoint=  %1
and got following message after dragging my file (dsm.tif) onto batch file:
Warning: Sorry, PixelScale is not writable
Warning: Sorry, ModelTiePoint is not writable
    0 image files updated
    1 image files unchanged


I guess that %1 is badly interpreted

Phil Harvey

My guess is that your batch file is running a different version of ExifTool.

- 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 ($).

Kofi

#4
Hello,

I am running version 12.12.... in both batches. One using %1 (with error)
exiftool -P -overwrite_original "-geotiff*=" -PixelScale= -ModelTiePoint=  %1
and one using directory (which works)
exiftool -P -overwrite_original "-geotiff*=" -PixelScale= -ModelTiePoint=  .\photos

PS. It works if I define the absolute path to exiftool in batch as:
C:\Users\paul.pelletier\Documents\ExifTool\exiftool -P -overwrite_original "-geotiff*=" -PixelScale= -ModelTiePoint=  %1

Phil, you were right! Somehow I had an old version (9.99) installed in C:\Windows folder and when running the batch with %1 dragging a file from other directory, it would then try to run old exiftool in Windows directory....

Thanks for your help on this issue!