Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Tom O'Reilly
Thanks Even and everyone!

As a workaround I think that for each XMP tag=value in the input .jpg, I can 
specify '-mo tag=value' option to gdal_translate. It appears that those 
tags/values are embedded and preserved in GDALMetadata through subsequent gdal 
processing. E.g. I can specify the following options to gdal_translate:

 % gdal_translate -mo Pitch=1.3 -mo Roll=5.5 -mo Yaw=192.1 

Then downstream tools can get Pitch, Roll and Yaw from the GDALMetadata tag.


Thanks
Tom
  

--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
http://www.mbari.org (World-wide Web)
 
"The machine does not isolate us from the great mysteries
 of nature, but plunges us more deeply into them."
 
   - ANTOINE DE SAINT-EXUPERY
 "Wind, Sand, and Stars" (1939)

- Original Message -
From: "Even Rouault" 
To: "Tom O'Reilly" 
Cc: "gdal-dev" 
Sent: Monday, August 8, 2022 1:37:03 PM
Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags

> The geotiff produced by step 1 contains the XMP tags as expected.
> But the warped geotiff produced by step 2 does not contain any XMP tags.

ah ok, gdalwarp indeed does not preserve the XMP information. I guess it 
would be reasonable to do it. You may create an enhancement ticket on 
the GDAL github issue tracker to suggest this.

Even

>
> How best to provide a test jpg? The ones I have are all 20+ MBytes.
>
> Thanks
> Tom
>
> --
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> orei...@mbari.org (email)
> http://www.mbari.org (World-wide Web)
>   
> "The machine does not isolate us from the great mysteries
>   of nature, but plunges us more deeply into them."
>   
> - ANTOINE DE SAINT-EXUPERY
>   "Wind, Sand, and Stars" (1939)
>
> ----- Original Message -----
> From: "Even Rouault" 
> To: "Tom O'Reilly" , "gdal-dev" 
> Sent: Monday, August 8, 2022 12:13:03 PM
> Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags
>
> Tom,
>
> It would be interesting if you could provide an image how to reproduce that
>
> With the sample file from the autotest suite, I can't reproduce that:
>
> $ gdal_translate ../autotest/gdrivers/data/jpeg/byte_with_xmp.jpg out.tif
>
> $ gdalinfo out.tif -mdd all
>
> Driver: GTiff/GeoTIFF
> Files: out.tif
> Size is 1, 1
> Metadata (xml:XMP):
> 
> 
> 
>
>         xmlns:dc='http://purl.org/dc/elements/1.1/'>
>     
>      
>       Description
>      
>     
>     
>      
>       XMP
>       Test
>      
>     
>     
>      
>       Title
>      
>     
>    
>
>         xmlns:tiff='http://ns.adobe.com/tiff/1.0/'>
>     
>      
>       8
>      
>     
>     1
>     20
>     20
> 1
> 1
>     1
>    
> 
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
> Metadata (DERIVED_SUBDATASETS):
> DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:out.tif
>     DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from out.tif
> Image Structure Metadata:
>     INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0,    1.0)
> Upper Right (    1.0,    0.0)
> Lower Right (    1.0,    1.0)
> Center  (    0.5,    0.5)
> Band 1 Block=1x1 Type=Byte, ColorInterp=Gray
>
> Le 08/08/2022 à 20:32, Tom O'Reilly a écrit :
>> gdal_translate output .tif file does not contain XMP tags that were
>> present in the input .jpg file.
>> The output file contains many of the input EXIF tags, aggregated as
>> the GDALMetadata tag, but not the XMP tags.
>> Why does gdal_translate remove XMP tags - is there an option to
>> preserve them?
>>
>> Thanks
>> Tom
>> --
>> Thomas C. O'Reilly
>> Monterey Bay Aquarium Research Institute
>> 7700 Sandholdt Road
>> Moss Landing, California 95039-9644
>> 831-775-1766 (voice)
>> 831-775-1620 (FAX)
>> orei...@mbari.org (email)
>> http://www.mbari.org (World-wide Web)
>>
>> "The machine does not isolate us from the great mysteries
>>   of nature, but plunges us more deeply into them."
>>
>>     - ANTOINE DE SAINT-EXUPERY
>>       "Wind, Sand, and Stars" (1939)
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Javier Jimenez Shaw
That makes more sense.
The PR that included the copy of the XMP is
https://github.com/OSGeo/gdal/pull/3050/
The key change is in the function GDALDriver::DefaultCreateCopy , that is
not used by gdalwarp
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...  ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.



On Mon, 8 Aug 2022 at 22:16, Tom O'Reilly  wrote:

> Hi Javier,
>
> As noted in my previous response, I was wrong about gdal_translate - it
> actually does transfer the XMP tags from the input to the output, as XMP
> tags.
> It is a subsequent call to gdalwarp that drops the XMP tags.
> I am running gdal 3.5.0
>
> Thanks
> Tom
> --
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> orei...@mbari.org (email)
> http://www.mbari.org (World-wide Web)
>
> "The machine does not isolate us from the great mysteries
>  of nature, but plunges us more deeply into them."
>
>- ANTOINE DE SAINT-EXUPERY
>  "Wind, Sand, and Stars" (1939)
>
>
> --
> *From: *"Javier Jimenez Shaw" 
> *To: *"Tom O'Reilly" 
> *Cc: *"gdal-dev" 
> *Sent: *Monday, August 8, 2022 12:03:39 PM
> *Subject: *Re: [gdal-dev] gdal_translate drops XMP exif tags
>
> Which version of GDAL are you using?
> in https://gdal.org/programs/gdal_translate.html there is an option,
> "-noxmp", since GDAL 3.2. Without that option it should keep them. If I
> remember correctly, the XMP tags are copied as proper XMP, not as
> GDALMetadata, with TIFF files.
>
> An example with "gdalinfo -mdd all" for input and output may help.
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...  ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
>
> On Mon, 8 Aug 2022 at 20:32, Tom O'Reilly  wrote:
>
>> gdal_translate output .tif file does not contain XMP tags that were
>> present in the input .jpg file.
>> The output file contains many of the input EXIF tags, aggregated as the
>> GDALMetadata tag, but not the XMP tags.
>> Why does gdal_translate remove XMP tags - is there an option to preserve
>> them?
>>
>> Thanks
>> Tom
>> --
>> Thomas C. O'Reilly
>> Monterey Bay Aquarium Research Institute
>> 7700 Sandholdt Road
>> Moss Landing, California 95039-9644
>> 831-775-1766 (voice)
>> 831-775-1620 (FAX)
>> orei...@mbari.org (email)
>> http://www.mbari.org (World-wide Web)
>>
>> "The machine does not isolate us from the great mysteries
>>  of nature, but plunges us more deeply into them."
>>
>>- ANTOINE DE SAINT-EXUPERY
>>  "Wind, Sand, and Stars" (1939)
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Even Rouault



The geotiff produced by step 1 contains the XMP tags as expected.
But the warped geotiff produced by step 2 does not contain any XMP tags.


ah ok, gdalwarp indeed does not preserve the XMP information. I guess it 
would be reasonable to do it. You may create an enhancement ticket on 
the GDAL github issue tracker to suggest this.


Even



How best to provide a test jpg? The ones I have are all 20+ MBytes.

Thanks
Tom

--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
http://www.mbari.org (World-wide Web)
  
"The machine does not isolate us from the great mysteries

  of nature, but plunges us more deeply into them."
  
- ANTOINE DE SAINT-EXUPERY

  "Wind, Sand, and Stars" (1939)

- Original Message -
From: "Even Rouault" 
To: "Tom O'Reilly" , "gdal-dev" 
Sent: Monday, August 8, 2022 12:13:03 PM
Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags

Tom,

It would be interesting if you could provide an image how to reproduce that

With the sample file from the autotest suite, I can't reproduce that:

$ gdal_translate ../autotest/gdrivers/data/jpeg/byte_with_xmp.jpg out.tif

$ gdalinfo out.tif -mdd all

Driver: GTiff/GeoTIFF
Files: out.tif
Size is 1, 1
Metadata (xml:XMP):




   
    
     
      Description
     
    
    
     
      XMP
      Test
     
    
    
     
      Title
     
    
   

   
    
     
      8
     
    
    1
    20
    20
1
1
    1
   



























Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:out.tif
    DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from out.tif
Image Structure Metadata:
    INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    1.0)
Upper Right (    1.0,    0.0)
Lower Right (    1.0,    1.0)
Center  (    0.5,    0.5)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray

Le 08/08/2022 à 20:32, Tom O'Reilly a écrit :

gdal_translate output .tif file does not contain XMP tags that were
present in the input .jpg file.
The output file contains many of the input EXIF tags, aggregated as
the GDALMetadata tag, but not the XMP tags.
Why does gdal_translate remove XMP tags - is there an option to
preserve them?

Thanks
Tom
--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
http://www.mbari.org (World-wide Web)

"The machine does not isolate us from the great mysteries
  of nature, but plunges us more deeply into them."

    - ANTOINE DE SAINT-EXUPERY
      "Wind, Sand, and Stars" (1939)

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Rahkonen Jukka
Hi,

If gdal_translate keeps the tags you should be able to create a small test file 
by reducing the size with -outsize.

-Jukka Rahkonen-



-Alkuperäinen viesti-
Lähettäjä: gdal-dev  Puolesta Tom O'Reilly
Lähetetty: maanantai 8. elokuuta 2022 23.14
Vastaanottaja: Even Rouault 
Kopio: gdal-dev 
Aihe: Re: [gdal-dev] gdal_translate drops XMP exif tags

Hi Evan,

I was mistaken in which gdal program drops the XMP tags.
gdal_translate actually transfers the XMP tags properly from the input jpg file 
to tif output.  But a subsequent gdalwarp on that tif does not pass the XMP 
tags to its output.

So the sequence is, for example:

step 1: Convert jpg to geotiff, using specified gcps gdal_translate -gcp 7952 0 
-121.7912 36.8015 -gcp 7952 5304 -121.7910 36.8012 -gcp 0 5304 -121.7915 
36.8010 -gcp 0 0 -121.7917 36.8013  -of GTiff  -co COMPRESS=DEFLATE -a_srs 
EPSG:4326 DSC01221.JPG test.tif

step 2: Warp the geotiff
gdalwarp -t_srs EPSG:4326 -of GTiff -dstalpha test.tif testwarp.tif


The geotiff produced by step 1 contains the XMP tags as expected.
But the warped geotiff produced by step 2 does not contain any XMP tags.

How best to provide a test jpg? The ones I have are all 20+ MBytes.

Thanks
Tom

--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
https://eur06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mbari.org%2Fdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C7c347d29dbc44bf5dcb208da797a9f78%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C637955864831990006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=KKLklE5oY8xr8uuILSsV32YGgD9NPoghdD%2BQ9uxdIjY%3Dreserved=0
 (World-wide Web)
 
"The machine does not isolate us from the great mysteries
 of nature, but plunges us more deeply into them."
 
   - ANTOINE DE SAINT-EXUPERY
 "Wind, Sand, and Stars" (1939)

- Original Message -
From: "Even Rouault" 
To: "Tom O'Reilly" , "gdal-dev" 
Sent: Monday, August 8, 2022 12:13:03 PM
Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags

Tom,

It would be interesting if you could provide an image how to reproduce that

With the sample file from the autotest suite, I can't reproduce that:

$ gdal_translate ../autotest/gdrivers/data/jpeg/byte_with_xmp.jpg out.tif

$ gdalinfo out.tif -mdd all

Driver: GTiff/GeoTIFF
Files: out.tif
Size is 1, 1
Metadata (xml:XMP):




  
   
    
     Description
    
   
   
    
     XMP
     Test
    
   
   
    
     Title
    
   
  

  
   
    
     8
    
   
   1
   20
   20
1
1
   1
  



























Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:out.tif
   DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from out.tif
Image Structure Metadata:
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    1.0)
Upper Right (    1.0,    0.0)
Lower Right (    1.0,    1.0)
Center  (    0.5,    0.5)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray

Le 08/08/2022 à 20:32, Tom O'Reilly a écrit :
> gdal_translate output .tif file does not contain XMP tags that were 
> present in the input .jpg file.
> The output file contains many of the input EXIF tags, aggregated as 
> the GDALMetadata tag, but not the XMP tags.
> Why does gdal_translate remove XMP tags - is there an option to 
> preserve them?
>
> Thanks
> Tom
> --
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> orei...@mbari.org (email)
> https://eur06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mbari.org%2Fdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C7c347d29dbc44bf5dcb208da797a9f78%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C637955864831990006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=KKLklE5oY8xr8uuILSsV32YGgD9NPoghdD%2BQ9uxdIjY%3Dreserved=0
>  (World-wide Web)
>
> "The machine does not isolate us from the great mysteries
>  of nature, but plunges us more deeply into them."
>
>    - ANTOINE DE SAINT-EXUPERY
>      "Wind, Sand, and Stars" (1939)
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-devdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C7c347d29dbc44bf5dcb208da797a9f78%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C637955864831990006%7CUnknown%7CTWFpbGZsb3d8eyJWI

Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Tom O'Reilly
Hi Javier, 

As noted in my previous response, I was wrong about gdal_translate - it 
actually does transfer the XMP tags from the input to the output, as XMP tags. 
It is a subsequent call to gdalwarp that drops the XMP tags. 
I am running gdal 3.5.0 

Thanks 
Tom 
-- 
Thomas C. O'Reilly 
Monterey Bay Aquarium Research Institute 
7700 Sandholdt Road 
Moss Landing, California 95039-9644 
831-775-1766 (voice) 
831-775-1620 (FAX) 
orei...@mbari.org (email) 
http://www.mbari.org (World-wide Web) 

"The machine does not isolate us from the great mysteries 
of nature, but plunges us more deeply into them." 

- ANTOINE DE SAINT-EXUPERY 
"Wind, Sand, and Stars" (1939) 


From: "Javier Jimenez Shaw"  
To: "Tom O'Reilly"  
Cc: "gdal-dev"  
Sent: Monday, August 8, 2022 12:03:39 PM 
Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags 

Which version of GDAL are you using? 
in [ https://gdal.org/programs/gdal_translate.html | 
https://gdal.org/programs/gdal_translate.html ] there is an option, "-noxmp", 
since GDAL 3.2. Without that option it should keep them. If I remember 
correctly, the XMP tags are copied as proper XMP, not as GDALMetadata, with 
TIFF files. 

An example with "gdalinfo -mdd all" for input and output may help. 
.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...  ._ .__ 
Entre dos pensamientos racionales 
hay infinitos pensamientos irracionales. 



On Mon, 8 Aug 2022 at 20:32, Tom O'Reilly < [ mailto:orei...@mbari.org | 
orei...@mbari.org ] > wrote: 



gdal_translate output .tif file does not contain XMP tags that were present in 
the input .jpg file. 
The output file contains many of the input EXIF tags, aggregated as the 
GDALMetadata tag, but not the XMP tags. 
Why does gdal_translate remove XMP tags - is there an option to preserve them? 

Thanks 
Tom 
-- 
Thomas C. O'Reilly 
Monterey Bay Aquarium Research Institute 
7700 Sandholdt Road 
Moss Landing, California 95039-9644 
831-775-1766 (voice) 
831-775-1620 (FAX) 
[ mailto:orei...@mbari.org | orei...@mbari.org ] (email) 
[ http://www.mbari.org/ | http://www.mbari.org ] (World-wide Web) 

"The machine does not isolate us from the great mysteries 
of nature, but plunges us more deeply into them." 

- ANTOINE DE SAINT-EXUPERY 
"Wind, Sand, and Stars" (1939) 
___ 
gdal-dev mailing list 
[ mailto:gdal-dev@lists.osgeo.org | gdal-dev@lists.osgeo.org ] 
[ https://lists.osgeo.org/mailman/listinfo/gdal-dev | 
https://lists.osgeo.org/mailman/listinfo/gdal-dev ] 




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Tom O'Reilly
Hi Evan,

I was mistaken in which gdal program drops the XMP tags.
gdal_translate actually transfers the XMP tags properly from the input jpg file 
to tif output.  But a subsequent gdalwarp on that tif does not pass the XMP 
tags to its output.

So the sequence is, for example:

step 1: Convert jpg to geotiff, using specified gcps
gdal_translate -gcp 7952 0 -121.7912 36.8015 -gcp 7952 5304 -121.7910 36.8012 
-gcp 0 5304 -121.7915 36.8010 -gcp 0 0 -121.7917 36.8013  -of GTiff  -co 
COMPRESS=DEFLATE -a_srs EPSG:4326 DSC01221.JPG test.tif

step 2: Warp the geotiff 
gdalwarp -t_srs EPSG:4326 -of GTiff -dstalpha test.tif testwarp.tif


The geotiff produced by step 1 contains the XMP tags as expected.
But the warped geotiff produced by step 2 does not contain any XMP tags.

How best to provide a test jpg? The ones I have are all 20+ MBytes.

Thanks
Tom

--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
http://www.mbari.org (World-wide Web)
 
"The machine does not isolate us from the great mysteries
 of nature, but plunges us more deeply into them."
 
   - ANTOINE DE SAINT-EXUPERY
 "Wind, Sand, and Stars" (1939)

- Original Message -
From: "Even Rouault" 
To: "Tom O'Reilly" , "gdal-dev" 
Sent: Monday, August 8, 2022 12:13:03 PM
Subject: Re: [gdal-dev] gdal_translate drops XMP exif tags

Tom,

It would be interesting if you could provide an image how to reproduce that

With the sample file from the autotest suite, I can't reproduce that:

$ gdal_translate ../autotest/gdrivers/data/jpeg/byte_with_xmp.jpg out.tif

$ gdalinfo out.tif -mdd all

Driver: GTiff/GeoTIFF
Files: out.tif
Size is 1, 1
Metadata (xml:XMP):




  
   
    
     Description
    
   
   
    
     XMP
     Test
    
   
   
    
     Title
    
   
  

  
   
    
     8
    
   
   1
   20
   20
1
1
   1
  



























Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:out.tif
   DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from out.tif
Image Structure Metadata:
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    1.0)
Upper Right (    1.0,    0.0)
Lower Right (    1.0,    1.0)
Center  (    0.5,    0.5)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray

Le 08/08/2022 à 20:32, Tom O'Reilly a écrit :
> gdal_translate output .tif file does not contain XMP tags that were 
> present in the input .jpg file.
> The output file contains many of the input EXIF tags, aggregated as 
> the GDALMetadata tag, but not the XMP tags.
> Why does gdal_translate remove XMP tags - is there an option to 
> preserve them?
>
> Thanks
> Tom
> --
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> orei...@mbari.org (email)
> http://www.mbari.org (World-wide Web)
>
> "The machine does not isolate us from the great mysteries
>  of nature, but plunges us more deeply into them."
>
>    - ANTOINE DE SAINT-EXUPERY
>      "Wind, Sand, and Stars" (1939)
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Even Rouault

Tom,

It would be interesting if you could provide an image how to reproduce that

With the sample file from the autotest suite, I can't reproduce that:

$ gdal_translate ../autotest/gdrivers/data/jpeg/byte_with_xmp.jpg out.tif

$ gdalinfo out.tif -mdd all

Driver: GTiff/GeoTIFF
Files: out.tif
Size is 1, 1
Metadata (xml:XMP):




 
  
   
    Description
   
  
  
   
    XMP
    Test
   
  
  
   
    Title
   
  
 

 
  
   
    8
   
  
  1
  20
  20
1
1
  1
 



























Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:out.tif
  DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from out.tif
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    1.0)
Upper Right (    1.0,    0.0)
Lower Right (    1.0,    1.0)
Center  (    0.5,    0.5)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray

Le 08/08/2022 à 20:32, Tom O'Reilly a écrit :
gdal_translate output .tif file does not contain XMP tags that were 
present in the input .jpg file.
The output file contains many of the input EXIF tags, aggregated as 
the GDALMetadata tag, but not the XMP tags.
Why does gdal_translate remove XMP tags - is there an option to 
preserve them?


Thanks
Tom
--
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
orei...@mbari.org (email)
http://www.mbari.org (World-wide Web)

"The machine does not isolate us from the great mysteries
 of nature, but plunges us more deeply into them."

   - ANTOINE DE SAINT-EXUPERY
     "Wind, Sand, and Stars" (1939)

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate drops XMP exif tags

2022-08-08 Thread Javier Jimenez Shaw
Which version of GDAL are you using?
in https://gdal.org/programs/gdal_translate.html there is an option,
"-noxmp", since GDAL 3.2. Without that option it should keep them. If I
remember correctly, the XMP tags are copied as proper XMP, not as
GDALMetadata, with TIFF files.

An example with "gdalinfo -mdd all" for input and output may help.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...  ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.



On Mon, 8 Aug 2022 at 20:32, Tom O'Reilly  wrote:

> gdal_translate output .tif file does not contain XMP tags that were
> present in the input .jpg file.
> The output file contains many of the input EXIF tags, aggregated as the
> GDALMetadata tag, but not the XMP tags.
> Why does gdal_translate remove XMP tags - is there an option to preserve
> them?
>
> Thanks
> Tom
> --
> Thomas C. O'Reilly
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, California 95039-9644
> 831-775-1766 (voice)
> 831-775-1620 (FAX)
> orei...@mbari.org (email)
> http://www.mbari.org (World-wide Web)
>
> "The machine does not isolate us from the great mysteries
>  of nature, but plunges us more deeply into them."
>
>- ANTOINE DE SAINT-EXUPERY
>  "Wind, Sand, and Stars" (1939)
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev