View Single Post
Old 12-21-2018, 02:56 PM   #5
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,322
Default

Yeah it was a joke. Anyway it says invert colors, doesn't say anything about alpha channel.

Here's an updated "Invert colors" preset:
Code:
// Invert colors (preserve alpha channel)
ok=input_info(input=0,project_w,project_h);
gfx_set(1);
gfx_fillrect(0,0,project_w,project_h);
gfx_set(0,0,0,-1,1); // negative alpha, additive
ok? ( 
  gfx_blit(input, 0);
  
  // restore alpha channel
  colorspace=='RGBA' ? ( gfx_mode=0xf0+3+3*4;  gfx_blit(input,0); );
);
Justin is online now   Reply With Quote