0

I have an application that needs to allow the user to change the hue of a jpeg stored in a TImage, I’ve successfully used the filter “THueAdjustEffect” that comes with Delphi XE6 to do this, however I need to be able to control this with more precision. What I need to achieve is the ability for the user to change the values of each RGB channel using sliders/trackbars to adjust the colour matrix of the jpeg by varying the amounts of Red, Green and Blue.

I’m new to image manipulation with Firemonkey and it may be straight forward but I can’t see a way this might be achieved. Any help would be greatly appreciated!

Thanks.

  • The hue effect will use a shader to do its work. If you want to adjust only specific channels, and no existing effect does what you need, you will need to create a custom effect (harder, but faster end performance.) Alternatively, convert to a FMX TBitmap, then use TBitmap.Map to access the pixel data directly as RGBA and alter the channel data yourself (easier, but slower end performance.) – David Jan 06 '15 at 19:53
  • Thank you David, I will look into creating my own custom effect, that's if my Delphi skills a good enough! – Blind Distortion Jan 07 '15 at 10:32
  • A completely custom shader can be a lot of work, but is worth it. Check out http://members.adug.org.au/2011/12/15/how-to-create-your-own-firemonkeyimage-filtereffect-to-use-with-firemonkey/ (unfortunately not accessible right now, I sent them an email. Try the Wayback Machine.) – David Jan 07 '15 at 12:48
  • Try this URL: https://adugmembers.wordpress.com/2011/12/15/how-to-create-your-own-firemonkeyimage-filtereffect-to-use-with-firemonkey/ – David Jan 09 '15 at 13:55

0 Answers0