D7WS HOMEPAGE WORKSHOP NEUE XTRAS GALERIE WORKSHOP Automatic Translation LESERSERVICE BUCH NEWS

HowTo: windowref.picture, ScreenXtra & Grabber

 

 

 

Home
Workshop-Seite

Deutsche Version

HowTo: Export JPEGs
with Director's own Xtras

Get
ScreenXtra
Grabber

Three ways to take a screenshot (on MacOS or Windows):

windowref.picture

Is a handle to the offscreen buffer of the stage or a window. With overlaying windows, it is still the window's picture without any overlay that is taken.
no cost – Director 7 core functionality
Export as file: use additional Xtras
Cropping with director's crop command
Shockwave-save (since it is an internal function), but only if no file is written
Director 7 -- Scripts here.
Warning: the stage.picture does NOT work on Windows 95/98 if the colordepth is set to 24 bit. Other colordepths apparently work. (see Quirk-list at updatestage)

ScreenXtra

Takes "real" screenshots – overlaying windows are in the picture, too.
No cost, even for commercial products. Obey licensing terms!
Saves as PICT / BMP, cast member or writes to the clipboard
Built-in scaling and cropping
If saved as cast member, further usage inside Director possible.
The Xtra is not Shockwave-safe
Director 5,6,7

Grabber

Takes "real" screenshots – overlaying windows are in the picture, too.
Costs USD$50 per platform
Saves as PICT / BMP or cast member
Built-in cropping, export of members as picture series in one file.
If saved as cast member, further usage inside Director possible.
Some functions are Shockwave-safe. But windowref.picture gives you the same functionality.
Director 5,6,7




 

 

 

 

A universal screenshot script:

-- Call: screenToMember(the stage), screenToMember(window "aWindowName")
--       screenToMember(the windowlist[2])

on screenToMember winref
  memref = new (#bitmap)
  memref.picture = winref.picture
end

Instead of #bitmap, it may sometimes be an option to use new(#picture). The member created will be a compressed pict (which takes less space, but may not be manipulated like normal bitmaps.)

 

Take a screenshot of the stage, crop and export as JPEG:

on exportStage fpath
  mmb = new(#bitmap)
  mmb.picture = the stage.picture
  mmb.crop(rect(10,10,630,470))  -- crops 10 pixel from all borders
  convertToJPEG(mmb, fpath, 75)  -- see here
end

Joachim Gola




 


Directorworkshop.de ist © Joachim Gola & Gerd Gillmaier 1998-2002. Alle Rechte vorbehalten.