Skip to main content
Hi,

 

 

when I reproject a tiff file it sets as black those areas that incure due to rotation of original file. Is there a way to set them in other color. Of course, using raster cell replacer you can. But that will change all black colors in photo which I'd like to preserve since they were there in original file.

 

 

Hi,

 

 

Cells in the outside area seem to be set to Nodata (0 by default).

 

How about setting Nodata value to a preferable color with the RasterBandNodataSetter before the reprojection?

 

 

Takashi
Thank you for the idea. Yeah, you could use that solution (with Pallete or BandRemover), but you need to be sure to pick the color that doesn't appear inside of photo (and I have about 10 000 photos with various content). The point is to only change color outside of reprojected area.
Hello,

 

FME create nodata value and it is appear in black.If you use RasterBandNodataSetter and write 255, this area will be in write and you won't see it if your found is white too.
hmm... the RasterBandNodataRemover can't be used to show the color, after reprojection? or use again the RasterBandNodaSetter to reset Nodata value.
@jydee

 

 

that is the point. I'm certain there is 255 color inside of picture that I don't want to define as no data. I need to mark only those on outside of photo.

 

 

@Takashi

 

I'm not sure i follow. I used RasterBandRemover or RasterPalette Remover to reset all colors on photo, and then RasterBandNodataSetter followed by reprojection. But I still need to define color that I don't have inside of photo (in RasterBandNodataSetter transformer) so that only outside area is marked as null.

 

 
I don't think you need to remove bands and palettes.

 

The RasterBandNodataSetter/Remover do not change cell values; they set/remove Nodata value definition of the raster feature.

 

My idea is:

 

read the raster

 

-> RasterBandNodataSetter (set or change Nodata definition to preferable color for outside area)

 

-> reprojection (value of outside cells will be set to Nodata)

 

-> RasterBandNodataRemover (remove Nodata definition) or RasterBandNodataSetter (reset Nodata definition)
Try the following:

 

1. for each channel if (DN = 0) than DN = DN +1

 

2. set no data value to 0

 

3. reproject your image

 

 

Borone 

Reply