Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 12-21-2018, 11:32 AM   #1
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default BUG: invert on transparent image doesn't work as expected

Take an image with transparent background, in my case a PNG with black logo, apply the Invert colors filter and the result is not as expected.

The transparent background is now white and the black logo is transparent.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-21-2018, 02:00 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

I dunno inverting the transparency sort of makes sense?
Justin is offline   Reply With Quote
Old 12-21-2018, 02:15 PM   #3
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Generally, alpha isn't inverted, only colours. Try it in Photoshop, Premiere, etc.

Either way, it's not terribly useful to invert the alpha. Perhaps if you thought the current behaviour was useful you could add a binary parameter Invert Transparency?
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-21-2018, 02:17 PM   #4
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Hmm, by that logic the transparent background should become opaque (but what colour?) and the black logo should become white.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-21-2018, 02:56 PM   #5
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
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 offline   Reply With Quote
Old 12-21-2018, 03:04 PM   #6
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Quote:
Originally Posted by Justin View Post
Yeah it was a joke.
Well I figured one use for the current behaviour is to invert a layer mask, so I guess someone might appreciate that behaviour.

But thank you for updating
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-21-2018, 03:13 PM   #7
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by daxliniere View Post
Well I figured one use for the current behaviour is to invert a layer mask, so I guess someone might appreciate that behaviour.

But thank you for updating
The idea is that all of these presets are easily tweakable by people to customize for various behaviors (though the alpha restoring is admittedly a bit tricky)
Justin is offline   Reply With Quote
Old 12-21-2018, 03:42 PM   #8
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Do you think we will see a JSFX-style shift where the code window and control window are separated?

In terms of UI, I'm wishing for larger controls with ability to type values and I think that once code has been completed, most people won't need to tweak it as much as the control parameters.

VSFX??
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-22-2018, 01:00 PM   #9
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

Quote:
Originally Posted by daxliniere View Post
Do you think we will see a JSFX-style shift where the code window and control window are separated?

In terms of UI, I'm wishing for larger controls with ability to type values and I think that once code has been completed, most people won't need to tweak it as much as the control parameters.

VSFX??
+1 to this. There are a lot of things I want to save as presets without changing the code.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 12-22-2018, 04:57 PM   #10
Winfield
Human being with feelings
 
Winfield's Avatar
 
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 705
Default

Quote:
Originally Posted by daxliniere View Post
I'm wishing for larger controls with ability to type values
So do I - and I have been way more nice than naughty

-W
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
Winfield is offline   Reply With Quote
Old 12-22-2018, 05:52 PM   #11
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by EpicSounds View Post
+1 to this. There are a lot of things I want to save as presets without changing the code.
+1 for separating presets and code. My hopes are that this would allow for proper version controlling.
wwwmaze is offline   Reply With Quote
Old 12-23-2018, 03:52 AM   #12
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by EpicSounds View Post
+1 to this. There are a lot of things I want to save as presets without changing the code.
You don’t have to change the code for presets, no?
Justin is offline   Reply With Quote
Old 12-23-2018, 05:46 AM   #13
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by Justin View Post
You don’t have to change the code for presets, no?
He meant that he wants to save parameter changes without always saving a new version of a preset. At least I interpreted it like that.
Eliseat is offline   Reply With Quote
Old 12-23-2018, 12:44 PM   #14
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

"You don’t have to change the code for presets, no? "

my preset list is already too big to fit on one screen and I've only saved unique code in each preset.

I deleted a lot of presets because it was too much of a pain to keep them updated with new functions or bug fixes. I save fx chains and have project templates but even that sometimes breaks if you change something. (example - chroma key for my lower third title card in my editing template stopped working in recent update)

The way JSFX work for presets is more ideal. Hide the code behind the edit button. Save as a new plugin. Use preset management to store parameter settings that belong with that code.

Example - color correction functions with presets saved for different looks.

Not something I expect to happen soon but would really help with user experience and would be less intimidating for new users. It would be much easier for us to share tools for video editing as plugins (.JSFX, .VPFX?) instead of each person having to copy and paste code they found on the forum.

I published over 100 videos edited in reaper this year. Clearly I can live without this stuff but it's one big thing that slows me down every time I make a video.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 12-26-2018, 05:21 AM   #15
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

You're sort of making my point here -- having the code saved in the preset actually makes sense, because then we can change the code without having to worry about breaking existing projects/presets. If the list is too long you can use FX chains/etc.
Justin is offline   Reply With Quote
Old 12-27-2018, 12:31 PM   #16
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

I've been thinking about this quite a bit. If there is a move to JSFX-type plugin, then existing projects will still be fine.

WRT changes to code for future projects (and backward compatibility from that point), what if there was a CRC used? Or an instance ID/version number?
Or even better, what if the code for a plugin was the baseline and you implemented a 'track changes' system? Any changes to the original code would be stored and recalled before the parameter values were loaded.

Possible?
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 01-15-2019, 03:55 AM   #17
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Just a quick note - you can use LBX Stripper script with video processors (found this out the other day).

Not ideal if you don't want the extra work creating GUI - but it is an option. Snapshots should work to save/recall parameter changes etc.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.