What is the bit depth of the NTF? You might need to scale it to an 8bit range when converting it, check out the -scale option flag for gdal_translate
https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-scale On Tue, Jun 29, 2021 at 3:33 PM Aparna Nimbalker via gdal-dev < [email protected]> wrote: > Hello, I am a beginner to gdal and I am working with .ntf, .NTF file > formats. > > I am trying to convert this one .NTF file (unfortunately I cannot share > the file) to a .png, so I can easily open it up and use it for a future > processing. This particular .NTF file is 1.39 GB. > > Right now I am working on a mac, in the terminal. I am using conda and > have set up a (gdal_project) environment. I have downloaded all the > necessary gdal packages and libraries by running conda install -c > conda-forge gdal in the terminal. > > I tried running for f in *.NTF do gdal_translate ${f} pngs/${f%.*}.png; > done > in the terminal for the NTF file I mentioned above (it was the only one > in the folder I was looping through). However, even though it creates a > png, all I see is a large png that does not show the image, but is > completely black. > > Please let me know where I am going wrong. Is there something I am missing > or should be doing that I am currently not? Is there a solution to my > problem? > > > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
