“Raster to other format” fails to work properly and make the jpeg output raster dark

944
10
09-09-2019 03:03 AM
lubnajarara_ah
New Contributor III

Hi All,

 

I couldn’t figure out why “Raster to other format” tool make the jpeg output raster dark?

 

I used “Raster to other format” tool to convert tiff- 8 bit unsigned raster to jpeg and the result was dark raster.

 

What might be the issue here?

 

The raw data is here

 

 

Best,

Lubna

10 Replies
DanPatterson_Retired
MVP Esteemed Contributor

what is the nodata value? resample method?  The "environments" tab for the tool allows you to set the raster parameters prior to running the tool 

Raster To Other Format—Conversion toolbox | ArcGIS Desktop (same in arcmap)

lubnajarara_ah
New Contributor III

Hi Dan Patterson

The below is information of the output raster.. What do you thing ?

What do you suggest to do

Thanks in advance

Best,

Lubna

DanPatterson_Retired
MVP Esteemed Contributor

The problem is the symbology.

In the original, class 0 is the black lines work and text, class 1 is white.

I converted to a jpeg, but used "unique symbols" in symbology (not stretched!) and symbologized the class 0 as black and class 1 as 'no colour'.  If you wanted to you could Reclass the raster so that class 0 is 1 and class 1 is nodata.

So in short... there is nothing wrong with the conversion, it is the symbology and the fact that 0 and 1 are switched from a conventional binary representation (eg 0 as nodata and 1 as data)

DanPatterson_Retired
MVP Esteemed Contributor

As an after thought... the color ramp you are using goes from black to white.... you could always just flip the colour ramp

lubnajarara_ah
New Contributor III

Hi Dan Patterson,

 

I tried the both suggestions that you had mentioned, but unfortunately, they are not working with me!

 

In my case, I have more than 100 georeferenced raster that I need to change them to jpeg to add them into a mosaic, so I don’t need to change the color of the raster at the level of sympology

 

I will be very appreciated for any help regarding this

 

Best,

Lubna

DanPatterson_Retired
MVP Esteemed Contributor

go with my original suggestion... but at some stage, you will have to symbolize the mosaic and if it defaults to what is the usual, you will just have to set a unique color scheme or invert the b&w scheme

lubnajarara_ah
New Contributor III

Dear Dan Patterson,

My mosaic contains a mix of raster that have a different colors that will be effected when I change the symbology of the whole mosaic

Best,

Lubna

DanPatterson_Retired
MVP Esteemed Contributor

So the problem compounds.

What is the colour ramp you are going to use?

If it is one with black for 0 and white for 1, then you will have to reclass your raster accordingly

Perhaps if you can fully expand upon what you have with those raster in the full context of the other rasters a less piecewise solution can be provided by others.

LanceCole
MVP Regular Contributor

lubna jarara'ah‌,

Looking through your correspondence with Dan Patterson‌ I noted your output JPG is 8-bit not 1-bit.  I also noted the value range is 0 to 2 not 0 to 1.  Just out of curiosity try setting No data value in the image Symbology to 0, 1 and 2 individually to see if this helps at least with the display.  This will not fix the image but possibly display the image correctly.

Rerun the Raster to Other Format tool but in the Environment Settings > Raster Storage section, 1) under pyramids - turn off Build pyramids. 2) under Raster Statics - turn off calculate statistics.  3) under compression use a B&W method such as RLE or one of the CCITT methods.  Click run.  I am not where I can test this at the moment.