-- Cartoon 1
-- Revision 1

--@TBCONFIG SLIDER: Line Thickness, 15
--@TBCONFIG SLIDER: Threshold, 98
--@TBCONFIG SLIDER: Detail, 100
--@TBCONFIG SLIDER: Color Boost, 50
--@TBCONFIG FLAG: Anti Alias, false
--@TBCONFIG INFO: Cartoon1
--@TBCONFIG INFO: Revision 1
--@TBCONFIG INFO:  
--@TBCONFIG INFO: A very versatile photo to cartoon filter.


paint_open(0)
paint_buffer_from_layer(0)
paint_filter("Negative",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Glow",0,sliderVal1 * 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Negative",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Line Art Cleaner",0,sliderVal2 * 1000,sliderVal3 * 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
if flagVal1 == true then
  paint_filter("Anti Alias",0,500,500,1000,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
end 
paint_buffer_from_layer(1)

paint_buffer_to_layer(0)
paint_filter("Contrast Mask",0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0)
paint_filter("Color Contrast",0,sliderVal4 * 1000,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0)

paint_buffer_merge_layer(1, MERGE_MULTIPLY, 255)
paint_close()




