help modifying - copy viewport to clipboard

hello
can any one help in changing gamma of the copied viewport from to 1.0 to 2.2?

http://www.scriptspot.com/3ds-max/scripts/copy-viewport-to-clipboard

..

macroScript Copy_Viewport_To_Clipboard
buttontext:"Copy Viewport"
Category:"CG_Tools" 
tooltip:"Copy Viewport To Clipboard" 
(
if setclipboardbitmap != undefined then		--check whether command is undefined... if so then avg not installed or using pre 3ds max 7...
	(
		therender = gw.getViewportDib() 	--new to max 6...
		if therender != undefined do 
			setclipboardbitmap therender	--clipboard access via AVG extension (in version 6 at least)
 
		therender = null
		gc()								--making sure it doesn't sit in memory any longer than needed...
	)
else
	(
		theerrormsg = "This script requires Larry Minton's AVGuard extension. You can download it from scriptspot.com or your favorite max plugin site."
		messagebox theerrormsg title: "AVGuard Extension Not Found"
	)
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture
Maxis's picture

Try this script.

b1 = gw.getViewportDib()
b1.filename = @"c:\temp\b1.hdr"
save b1
close b1
free b1
--
b1 = openBitMap  @"c:\Temp\b1.hdr" gamma:0.5
setclipboardbitmap b1
close b1
free b1

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.