AnsweredAssumed Answered

Convert jpg to tif - arcpy

Question asked by yaron148 on Mar 30, 2015
Latest reply on Apr 20, 2015 by yaron148

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

Outcomes