Skip to main content
Question

Remove white areas


we have an 8 bit image which has some white areas which we would like to remove.

 

but it would help us a lot if we knew how to make 32bit out of 8bit.

 

Thank you

 

 

8 replies

redgeographics
Celebrity
Forum|alt.badge.img+47

You can try the RasterInterpretationCoercer.


  • Author
  • June 12, 2019
redgeographics wrote:

You can try the RasterInterpretationCoercer.

This we have tried but it always led to an error message


redgeographics
Celebrity
Forum|alt.badge.img+47
fluusha wrote:

This we have tried but it always led to an error message

What settings did you try and what was the error message?


  • Author
  • June 12, 2019
redgeographics wrote:

You can try the RasterInterpretationCoercer.

Error:

RasterInterpretationCoercer_<Rejected>: Termination Message: 'RasterInterpretationCoercer output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 12, 2019

@fluusha

You need to check the rejected object. There will be a message specifying (if your lucky) the error in more detail.

 

What is the input raster? Do you have a sample?

8 bit:

rgba32 = 4x8

rgb24 = 3x8.

 


  • Author
  • June 12, 2019
gio wrote:

@fluusha

You need to check the rejected object. There will be a message specifying (if your lucky) the error in more detail.

 

What is the input raster? Do you have a sample?

8 bit:

rgba32 = 4x8

rgb24 = 3x8.

 

only 8 bit


redgeographics
Celebrity
Forum|alt.badge.img+47
fluusha wrote:

only 8 bit

If it's PNG it's probably using a pallette. Try the RasterPalletteResolver first, then the RasterInterpretationCoercer.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 12, 2019
fluusha wrote:

only 8 bit

bithdept (Bittiefe) doesn't mean its a single band png.

Check the png by using a datainspector and look at the feature information window.

Or use a rasterpropertyextractor to get the info.

 

It hink @redgeographics is right:

 

I did this on a png after adding a pallete and get the error u have:

RasterInterpretationCoercer_<Rejected>: Termination Message: 'RasterInterpretationCoercer output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''

 

if you check the rejected feature you see the following:

@ReinterpretRaster: In RASTER mode, if any bands contain palettes then the requested interpretation may only be one of 'UINT8, UINT16, UINT32'

 

 

So either use unisgned 32 (uint32) or as Red said, remove the palette.

Resolving replaces the bandcell values with the palette values. I wonder if you want that.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings