Hi
I have several rasters( jpg files ) and i want convert them to tif files to file " OtherFormat" in env.workspace with arcpy. In my code i try to convert all jpg file:
import arcpy,os,sys,string import arcpy.mapping from arcpy import env env.workspace = r"C:\Project\out" arcpy.RasterToOtherFormat_conversion("*.jpg","OtherFormat","TIFF") print 'converted'
but get en error:
ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Rasters: Dataset *.jpg does not exist or is not supported Failed to execute (RasterToOtherFormat).
any help would be great
Solved! Go to Solution.
Hi Xander,
i run the code with this changes :
in_folder = r"C:\Project\out" out_folder = r"C:\Project\out\jpg"
and the result:
>>> [u'BSM-1534.tif'] BSM-1534.tif >>>
and no converted rasters in the out folder. I don't know why the code don't convert- it seems right and clear
Hi Xander,
i don't know why it's wrong. i get result:
>>>
[u'BSM-1534.tif']
BSM-1534.tif
>>>
and the raster didn't converted
I have no idea... the code worked for me on my sample data.
Maybe you can attach the mentioned TIF so I can see what it's like?
the tif raster size is more than 500 mega.how can i send it and to which email?
by the way, i succeed convert jpg to tif but when i try tif2jpg it don't work.
and more important to me to convert ecw to jpg. in ArcGIS Help (10.2, 10.2.1, and 10.2.2)
i don't see any mention to ecw file
Try it with a smaller size tif to see if it image size (which I suspect, or a corrupt tif)
Convert the ecw to another format in the originating software if you have it
you right!! i tried with smaller size tif raster and tif2jpg succeed.
but when i tried ecw2tif the python stop working. could you know way?
i don't have originating software. can you recommend one please?
google " ecw to tif " there are purportedly free converters and trial versions online if ArcMap doesn't support ecw