[gdal-dev] [GDAL-dev] convert rgba alpha layer to rgb white

2014-02-05 Thread Pierre CARREAUD
Hi list,

I’m trying to assembly some RGBA tiff in one with gdalbuildvrt and then to
translate them to a RGB TIFF tiled file YCBCR jpeg compressed.

No problem… But now, I would like to get a white color in the background
instead of the black.

 

The following commands work but I get nodata (and so, black) on any white
pixels whereas I just wanted to convert alpha to white… The problem in on
the vrt.

 

gdalbuildvrt assembly.vrt -srcnodata b4 –hidenodata -vrtnodata 255 *.tif

gdal_translate -of GTIFF -b 1 -b 2 -b 3 -co COMPRESS=JPEG -co
JPEG_QUALITY=95 -co TFW=YES -co BIGTIFF=YES -co ALPHA=NO -co TILED=YES -co
PHOTOMETRIC=YCBCR -co PROFILE=BASELINE assembly.vrt assembly_JPG.tif

gdaladdo -r gauss -ro --config COMPRESS_OVERVIEW JPEG --config
JPEG_QUALITY_OVERVIEW 95 --config BIGTIFF_OVERVIEW YES --config
PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL --config
NODATA_VALUES 255 assembly_JPG.tif 2 4 8 16 32 64 128 256

 

Do you have an idea? The problem is the is not –init option, just -vrtnodata
“255 255 255” to fix both background color but also the nodata bandper band…

 

Pierre CARREAUD

Spécialiste en imagerie numérique

 


carte_voeux_2014

L’INGÉNIERIE DE LA DURABILITÉ

 

SITES – Entité Île-de-France

Division du Développement Technique

2 bis avenue du Centre

92500 Rueil-Malmaison, France

Tel : 01 41 39 02 00 / Fax : 01 41 39 02 01

 http://www.sites.fr/ www.sites.fr

 

CARRES  EXPERTISE  cid:image002.jpg@01CB7A74.CDE1E680  INSTRUMENTATION /
MESURES  cid:image002.jpg@01CB7A74.CDE1E680  INGENIERIE

 

image001.jpgimage002.jpgimage003.jpg___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Support of KOLOR KRO raw file

2013-12-12 Thread Pierre CARREAUD
Hi List,

Do you know if GDAL can read .kro files ? It’s KOLOR Raw format. This type
of file is exported by Kolor Autopano Giga. If not, is it hard to implement?

The format is following: (http://www.autopano.net/wiki-en/Format_KRO )

Header is 20 bytes long :
 3 bytes : KRO signature in hex 0x4B 0x52 0x4F
 1 byte  : 0x01 version
 unsigned long : Width
 unsigned long : Height
 unsigned long : depth =  8 bits, 16 bits, 32 bits  unsigned long : ncomp
= number of compoment, 4 by default, RGB + Alpha  Data * : the data
uncompressed

- Everything is stored in big endian form ( header and datas )
- the data is stored RGBA, RGBA ( or RGB, RGB if you have 3 component only )
- It's row major order, meaning, you store first row, then second row
- top row is the first row
- Within a row, are columns stored left-to-right
- 16bits format is a 16bits integer (0..65535), not floating point ( it's
not like half floating point in openEXR )
- 32bits format is pure 'c' float stored binary in big endian format ( IEEE
754 binary floating point )
- no color space specification nor metadata stored
- file size limit is ruled by file system

Regards,

Pierre CARREAUD
Responsable d’affaire en topographie et lasergrammétrie


L’INGÉNIERIE DE LA DURABILITÉ
 
SITES – Entité Île-de-France
Pôle MIR (Métrologie - Instrumentations - Relevés)
2 bis avenue du Centre
92500 Rueil-Malmaison, France
Tel : 01 41 39 02 00 / Fax : 01 41 39 02 01 www.sites.fr
 
  EXPERTISEINSTRUMENTATION / MESURESINGENIERIE


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