On svg saturate works great. Twist the slider within 0..5 - the picture changes (I think the view code does not need to be given). Sending data to the server - when saving saturate = '0.5' or '0.9' or '0.2', the picture changes, while saving saturate = '2.5' or '1.1' or '3.4' is already ignored. Generating svg strings on backend:

"<?xml version='1.0' encoding='UTF-8' standalone='yes'?> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'> <svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='#{image_height}' width='#{image_width}'> <defs> <filter id='fp1'> <feComponentTransfer> <feFuncR slope='#{r_component}' type='linear'></feFuncR> <feFuncG slope='#{g_component}' type='linear'></feFuncG> <feFuncB slope='#{b_component}' type='linear'></feFuncB> <feFuncA type='identity'></feFuncA> </feComponentTransfer> <feColorMatrix type='saturate' values='#{saturate}'></feColorMatrix> </filter> </defs> <image filter='url(#fp1)' height='100%' width='100%' xlink:href='#{self.image.path}'></image> </svg>" 

Headers, versions and filters in the line removed - also works.

  • Is the upper limit 5 to 1 given? - Mal Skrylev
  • comment is not quite clear - SerjEast
  • data is not converted in any way. from the input I send "2.5", I save "2.5", "2.5" is ignored as a value. - SerjEast

0