Skip to main content
Question

Can use a formula to change the RGB values in a raster?

  • December 5, 2022
  • 1 reply
  • 28 views

I have a large number of images, some of which have a colour range that is different to the rest. I have a csv file that lists each filename and whether it requires adjustment or not.

I would like to be able to modify the red, green and blue for those images using a quadratic formula, something like:

 

set Red=if([needsadjustment]=1,max(min(Red^2*-0.004+Red*1.78+57,255),0),Red)

and similarly for green and blue channels.

Can anyone advise if this is possible using FME please?

Thanks

Rob

1 reply

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • December 5, 2022

Hi @robshawuk​ 

 

I suggest you to use the transformer RasterExpressionCalculator.

 

Thanks in Advance,

Danilo