<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic export raster in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/export-raster/m-p/1304394#M70710</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm trying to convert 16-bit rasters to 8-bit rasters in ArcGIS Pro. I'm attempting to do it automatically.&lt;/P&gt;&lt;P&gt;However, all I'm getting are blank rasters without any information.&lt;/P&gt;&lt;P&gt;Here's what I used:&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;input_folder = r"path_to_folder"&lt;BR /&gt;output_folder = r"path_to_folder"&lt;/P&gt;&lt;P&gt;# Nastavenie pracovného priečinka&lt;BR /&gt;arcpy.env.workspace = input_folder&lt;/P&gt;&lt;P&gt;# Získanie všetkých rastrových súborov v pracovnom priečinku&lt;BR /&gt;input_rasters = arcpy.ListRasters("*", "TIF")&lt;/P&gt;&lt;P&gt;for input_raster in input_rasters:&lt;BR /&gt;input_raster_path = input_folder + "\\" + input_raster&lt;BR /&gt;output_raster = output_folder + "\\" + input_raster&lt;BR /&gt;arcpy.CopyRaster_management(input_raster_path, output_raster, pixel_type="8_BIT_UNSIGNED")&lt;BR /&gt;rendered_raster = arcpy.ia.Render(input_raster_path, {'bands': [1, 2, 3]}).save(output_raster)&lt;/P&gt;&lt;P&gt;I need to define renderer settings, any idea how?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 12:23:16 GMT</pubDate>
    <dc:creator>JúliaMat</dc:creator>
    <dc:date>2023-06-29T12:23:16Z</dc:date>
    <item>
      <title>export raster</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-raster/m-p/1304394#M70710</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm trying to convert 16-bit rasters to 8-bit rasters in ArcGIS Pro. I'm attempting to do it automatically.&lt;/P&gt;&lt;P&gt;However, all I'm getting are blank rasters without any information.&lt;/P&gt;&lt;P&gt;Here's what I used:&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;input_folder = r"path_to_folder"&lt;BR /&gt;output_folder = r"path_to_folder"&lt;/P&gt;&lt;P&gt;# Nastavenie pracovného priečinka&lt;BR /&gt;arcpy.env.workspace = input_folder&lt;/P&gt;&lt;P&gt;# Získanie všetkých rastrových súborov v pracovnom priečinku&lt;BR /&gt;input_rasters = arcpy.ListRasters("*", "TIF")&lt;/P&gt;&lt;P&gt;for input_raster in input_rasters:&lt;BR /&gt;input_raster_path = input_folder + "\\" + input_raster&lt;BR /&gt;output_raster = output_folder + "\\" + input_raster&lt;BR /&gt;arcpy.CopyRaster_management(input_raster_path, output_raster, pixel_type="8_BIT_UNSIGNED")&lt;BR /&gt;rendered_raster = arcpy.ia.Render(input_raster_path, {'bands': [1, 2, 3]}).save(output_raster)&lt;/P&gt;&lt;P&gt;I need to define renderer settings, any idea how?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 12:23:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-raster/m-p/1304394#M70710</guid>
      <dc:creator>JúliaMat</dc:creator>
      <dc:date>2023-06-29T12:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: export raster</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-raster/m-p/1305007#M70740</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/632982"&gt;@JúliaMat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the attached script in a Notebook in ArcGIS Pro. My version of Copy Raster was the result of dragging and dropping a successful Copy Raster GP tool result into the Python window. Oddly enough this worked just fine as the GP tool, and successfully converted to 8bit. Running the same code in the Notebook script failed to convert to 8 bit, which seems like a bug to me. I'd ask that you open up a Support case so we can get that logged and investigate further. Outside of this, I found I was able to successfully view the rasters within ArcGIS Pro once I selected the "DRA" button under the Raster Layer ribbon. I could not find an equivalent command for arcpy. Hopefully this helps a bit.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
from arcpy.sa import *
from arcpy.ia import *
inputR = r"C:\arcgis\ArcTutor\Raster\Data\Amberg_tif"
output = r"C:\temp"
arcpy.env.workspace = input
input_rasters = arcpy.ListRasters("*","TIF")
input_rasters
['090160.tif', '090161.tif', '090162.tif', '090163.tif', '100176.tif', '100177.tif', '100178.tif', '100179.tif', '110208.tif', '110209.tif', '110210.tif', '110211.tif']
for input_raster in input_rasters:
    input_raster_path = inputR + "\\" + input_raster
    output_raster = output + "\\" + input_raster
    arcpy.management.CopyRaster(
    in_raster= input_raster_path,
    out_rasterdataset= output_raster,
    config_keyword="",
    background_value=None,
    nodata_value="256",
    onebit_to_eightbit="NONE",
    colormap_to_RGB="NONE",
    pixel_type="8_BIT_UNSIGNED",
    scale_pixel_value="NONE",
    RGB_to_Colormap="NONE",
    format="TIFF",
    transform="NONE",
    process_as_multidimensional="CURRENT_SLICE",
    build_multidimensional_transpose="NO_TRANSPOSE"
)
    rendered_raster = arcpy.ia.Render(input_raster_path, {'bands': [1, 2, 3]}).save(output_raster)
rendered_raster&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 18:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-raster/m-p/1305007#M70740</guid>
      <dc:creator>Taren_Esri</dc:creator>
      <dc:date>2023-06-30T18:46:21Z</dc:date>
    </item>
  </channel>
</rss>

