Forum: Poser - OFFICIAL


Subject: V5 and Poser

ravenous opened this issue on Dec 10, 2011 · 60 posts


lmckenzie posted Thu, 15 December 2011 at 9:02 PM

For the *truly insane* - you could create your own custom overlay script, albeit only for Windows. I'm sure it's possible on the Mac but I don't do Mac. With a bit of vbScript and the free gflax.dll from the creator of the excellent XnView image viewer, I created a drag and drop overlayer as an experiment. This is a really very bare bones example with paths and file names hard coded, and assumes that the two images are the same sizes. Of course you can make it more elaborate i.e. resizing the overlay, choice of file names etc., or code something in another language. **Use at your own risk** of course - NO error checking included & I am not really a vbScript coder :-) Tested ONLY on Windows XP. If all of this is Greek to you pls. bypass. Example uses a tattoo overlay .psd with alpha from most-digital-creations.com on a plain blue jpg.

Gflax.dll: http://www.xnview.com/en/download_gfl.html
download the GFLAx (ActiveX/ASP component) light v2.80 zip file
you should only need the Gflax.dll from the GflAxLiblight folder
'--------------------------------------------
' Overlay.vbs
' Requires an overlay image named overlay.psd
' Outputs overlaid image named composite.jpg
' Overlay & base image dimensions must match e.g. 2000x2000
' Put GflAx.dll in a folder of your choice
' Register GflAx.dll
' Paste Script into notepad
' Change Z:Overlay in strFolder = "Z:Overlay" to your Drive:Folder
' Save script as overlay.vbs in folder with GflAx.dll
' Place a .psd (with alpha) file named Overlay.psd in same folder
' Drag and drop a .jpg image onto overlay.vbs icon
'--------------------------------------------
'<< Start of Script >>
Dim objGFL
Dim objArgs
Dim strBaseImage
Dim strFolder

Set objArgs = WScript.Arguments
Set objGFL = CreateObject("GflAx.GflAx")

objGFL.SaveFormat = 1               'Save as jpeg
objGFL.SaveJPEGQuality = 100    'Maximum Quality

strBaseImage = objArgs(0)
Set objArgs = Nothing
strFolder = "Z:OverLay"

objGFL.LoadBitmap strBaseImage                               'Base Image
objGFL.drawimage strFolder & "Overlay.psd", 0, 0      'Overlay Image
objGFL.SaveBitmap strFolder & "Composite.jpg"         'Composite Image
MsgBox "Composite.jpg Saved",vbOkOnly,"Done!"

Set objGFL = Nothing
'<< End of Script >>

'-------------------
'How To Register dll
'I'd do a search 1st in case the dll is already on your system
'-------------------
'From a command prompt type:
'regsvr32 Z:OverlayGflAx.dll (Change Z:Overlay to proper folder)
'-
'To unregister it:
'regsvr32/u Z:OverlayGflAx.dll (Change Z:Overlay to proper folder)
'--------------

The library provides a host of image processing functions, enough to create your own mini Photoshop, plus in the forums it was announced that it can be used freely even for commercial projects. vbScript doesn't provide any way to see the images, but it works fine for this sort of thing and doesn't require an .exe. Use VB, C++ etc. for something more complex. There are Mac and Linux versions but AFAIK, only the Windows ActiveX version is free for commercial use.

"Democracy is a pathetic belief in the collective wisdom of individual ignorance." - H. L. Mencken