Re: [gdal-dev] Create COG jpeg tiles with JFIF APPn markers

2022-04-05 Thread Even Rouault

Jose,
Those tiles contain normal JPEG markers (SOI, SOF0, DQT) but no JFIF 
marker (APP/n/) is added. How can I ensure adding this JFIF marker?


you can't, unless you're ready to patch the JPEG codec in libtiff to do that

I should point to 
https://www.awaresystems.be/imaging/tiff/specification/TIFFTechNote2.txt 
which mentions:


"Writers should avoid including "noise" JPEG markers (COM and APPn markers).
Standard TIFF fields provide a better way to transport any non-image data.
Some JPEG codecs may change behavior if they see an APPn marker they
think they understand; since the TIFF spec requires these markers to be
ignored, this behavior is undesirable."

Even

--
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] Create COG jpeg tiles with JFIF APPn markers

2022-04-05 Thread Rahkonen Jukka (MML)
Hi,

I would like to inform that you did write mail to the right place even you have 
not received any answers yet. Unfortunately your question is too specific for 
most GDAL users and capable developers are very busy as you can see from the 
GitHub activity. Let's still hope that somebody reacts.

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta Jose Calvo
Lähetetty: tiistai 29. maaliskuuta 2022 9.59
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] Create COG jpeg tiles with JFIF APPn markers

Hi.

Currently my c++ app creates COG files from GeoTiff tiled files.


GeoTiff files are created using JPEG compression with YCBCR photometric using 
following creation options:

  *   PROFILE=GeoTIFF
  *   TILED=YES
  *   BLOCKXSIZE=xxx
  *   BLOCKYSIZE=xxx
  *   COMPRESS=JPEG
  *   PHOTOMETRIC=YCBCR
  *   JPEG_QUALITY=xx
  *   JPEGTABLESMODE=0
>From this Geotiff files, app creates COG tiled files using following options:

  *   BLOCKSIZE=xxx
  *   OVERVIEWS=FORCE_USE_EXISTING
  *   COMPRESS=JPEG
  *   QUALITY=xx
Those tiles contain normal JPEG markers (SOI, SOF0, DQT) but no JFIF marker 
(APPn) is added. How can I ensure adding this JFIF marker?

I'm using gdal 3.1.0.7 in a ubuntu 20.10 using both strategies:

  *   internal jpeg and tiff code: --with-jpeg=internal --with-libtiff=internal
  *   external jpeg and tiff libraries: libjpeg.so.8.2.2 libtiff.so.5.5.0
Thanks in advance.

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


[gdal-dev] Create COG jpeg tiles with JFIF APPn markers

2022-03-29 Thread Jose Calvo
Hi.

Currently my c++ app creates COG files from GeoTiff tiled files.


GeoTiff files are created using JPEG compression with YCBCR photometric using 
following creation options:

  *   PROFILE=GeoTIFF
  *   TILED=YES
  *   BLOCKXSIZE=xxx
  *   BLOCKYSIZE=xxx
  *   COMPRESS=JPEG
  *   PHOTOMETRIC=YCBCR
  *   JPEG_QUALITY=xx
  *   JPEGTABLESMODE=0

>From this Geotiff files, app creates COG tiled files using following options:

  *   BLOCKSIZE=xxx
  *   OVERVIEWS=FORCE_USE_EXISTING
  *   COMPRESS=JPEG
  *   QUALITY=xx

Those tiles contain normal JPEG markers (SOI, SOF0, DQT) but no JFIF marker 
(APPn) is added. How can I ensure adding this JFIF marker?

I'm using gdal 3.1.0.7 in a ubuntu 20.10 using both strategies:

  *   internal jpeg and tiff code: --with-jpeg=internal --with-libtiff=internal
  *   external jpeg and tiff libraries: libjpeg.so.8.2.2 libtiff.so.5.5.0

Thanks in advance.

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