use of Jpeg2000 ?

Frank Warmerdam warmerdam at POBOX.COM
Thu Feb 9 11:13:31 EST 2006


Ricaille Tanguy wrote:
> Hi,
> i have jp2 files in approximately 927*927 pixels in 4 multispectral bands,
> coded in 16bits, and i need to provide 500*500 pixels in 3 multispectral
> bands, coded in 8 bits, as a quick look for this image.
> 
> I try to use gdal_translate -ot Byte -of JPEG -b 1 -b 2 -b 3 test.jp2
> test.jpeg, but result is completly black.
> I have try ather parameter and it is each time the same result.

Tanguy,

This looks like it should work, or might give a saturated white result.
If you add -scale, it should rescale for you too.

eg.
gdal_translate -ot Byte -scale -of JPEG -b 1 -b 2 -b 3 test.jp2 test.jpg

But that does not appear to be the issue since you are getting black.
Could you make your image available for me to try?  Also, what GDAL
build are you using?  FWTools? your own?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, 
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list