Continusly to Convert jpg raster format to tif format, i try to convert tif file to jpg:

import arcpy, os , glob

outworkspace = r"C:\Project\out\OtherFormat"
listOfFiles = glob.glob( r"C:\Project\out\*.tif")
arcpy.RasterToOtherFormat_conversion(listOfFiles , outworkspace ,"JPEG") 
print 'converted'

the result is:


and the tif file isn't converted. I work with arcview 10.3 and when i run the convert tool i get this message and cannot run the tool: enter image description here

  • What happens when you try to convert a single TIFF file to JPEG without having glob in the loop? – PolyGeo Mar 31 '15 at 10:03
  • got the same result : "converted" without any converted raster – newGIS Mar 31 '15 at 10:08
  • Try running it from the tool dialog and editing your question to include the parameters entered and the output in the results window. Also, what version of ArcGIS for Desktop are you running? – PolyGeo Mar 31 '15 at 10:14
  • 1
    It looks like your raster has an invalid format. Have you tried adding it to a blank map to see if it will draw? I suspect it will not. – PolyGeo Mar 31 '15 at 10:36
  • 1
    Do you have multiband rasters or single band? Float or integer? – Aaron Mar 31 '15 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.