[FWTools] help converting format
Benoît Andrieu
bea at ixsea.com
Fri Feb 12 09:39:59 EST 2010
Dear Carlos,
Yes, you should open a FWTools shell or set the FWTools path in your
PATH environment variable.
And yes, the command line should be executed in the directory where your
images are but you can easily customize his behaviour :
mkdir __your_path__\converted
FOR %%g in (__your_path__\*.tif) do gdal_translate -of JPEG
"__your_path__\%%nxg" "__your_path__\converted\%%ng.jpg"
The first line will create a new folder in your folder.
FOR %%g in (__your_path__*.tif) ===> This will select all the files
in your directory and iterate with the %%g variable
"%%nxg" ===> n = name of the file without its
extension, x = extension of the file, g = the name of the variable
"%%ng.jpg" ===> This will change the extension
of the file
Regarding the binary format, could you tell me more about the file you
sent ?
I would need its width, height, number of bands (gray, RGB, ARGB ?) and
the data type of each pixel (Byte, Int16, Float32 ?).
Thanks.
I would use the GenBin format too but unfortunately, GDAL is only able
to read them...
*_To the list :_*
You can find the file sent by Carlos at this address
http://benoit.andrieu.free.fr/00046agua.zip
Best regards,
Benoît Andrieu
Le 12/02/2010 13:06, Carlos Padovani a écrit :
> Dear Benoît,
> thanks very much for your fast response.
> I am not familiar with command line procedures, so could you explain
> in more details what should I do for to convert the tif images to
> other format?
> I will use this command line in the FWTools Shell? I need to wrote
> this command line in a directory where the images are?
> I took a look in the http://www.gdal.org/formats_list.html and I guess
> that the binary files I need to convert from tif are the Generic
> Binary (GenBin).
> I am sending an image file for you to take a look if you agree and
> maybe help me to identify if it is the same Generic Binary of gdal
> format list.
> Thanks once more.
> Carlos
> On Fri, Feb 12, 2010 at 10:04 AM, Benoît Andrieu <bea at ixsea.com
> <mailto:bea at ixsea.com>> wrote:
>
> I don't know about binary formats but you should find what you
> want here : http://www.gdal.org/formats_list.html
>
>
> You can use a bat file to convert all files from a folder :
>
> mkdir converted
> FOR %%g in (*.tif) do gdal_translate -of JPEG "%%nxg"
> "converted\%%ng.jpg"
>
>
> Regards,
> Benoît Andrieu
>
>
>
> Le 12/02/2010 11:00, Carlos Padovani a écrit :
>> Dear users of FWTools,
>> I need to convert a lot of images form TIFF format to binary format.
>> It is possible to do it in FWTools, but I do not know which is
>> the format available in the software that correspond to binary
>> format. Another thing is that in FWTools I can convert the images
>> one by one, and as I have a lot of images to convert, I would
>> like a way to convert a lot of images at once. I use Windows WP
>> as operacional system.
>> Could someone help me?
>> Thanks in advance.
>> Carlos
>>
>>
>> _______________________________________________
>> FWTools mailing list
>> FWTools at lists.maptools.org <mailto:FWTools at lists.maptools.org>
>> http://lists.maptools.org/mailman/listinfo/fwtools
>> http://fwtools.maptools.org/
>>
>
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org <mailto:FWTools at lists.maptools.org>
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
>
>
>
>
> --
> Carlos Padovani
> Pesquisador
> Embrapa Pantanal
> www.cpap.embrapa.br <http://www.cpap.embrapa.br>
> SKYPE: carlos.padovani
> MSN:crpadovani at hotmail.com <mailto:MSN%3Acrpadovani at hotmail.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20100212/95af68be/attachment.htm
More information about the FWTools
mailing list