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

HowTo: Export JPEGs with Director's own Xtras

 

 

 

Home
Workshop-Seite

Deutsche Version

Alternative & supplement:
Grabber & ScreenXtra

Update for Director 8 and new download

This is an easy, yet powerful one:

Have you ever wondered how the JavaConvert Xtra could be used in your own Director movies? How about exporting JPEGs for free – no need for an Xtra besides the Macromedian ones...

Be sure you have these Xtras installed / in the Xtras folder near your projector:

JavaConvert, Mix Services, BMP Import Export, JPEG Export

I tested one-by-one, so even if it's not obvious what BMP Import Export is doing, it's necessary (all tests on MacOS, BTW). Also, don't include your movie in a projector, leave it external, and name it "as usual" aName.dir or aName.dcr also on the Mac.

And put this script into your movie:

on convertToJPEG mymember,myfilepath, myquality
  myinst = new(xtra "JavaConvert")
  set the itemdelimiter = "."
  myinst.ExportMedia(item 1 of the movie, mymember, ¬
    myfilepath, 1, myquality, mymember.castlibnum)
  -- put the result -- will be <VOID>
  myinst = 0
end

and call it like this: converttojpeg(member "hans", "aDisk:aFolder:aFile.jpg", 75)

That's it! JPEG Export on your own... Large castmembers may take a moment or two to export.

BTW: most likely these Xtras are not Shockwave-safe.

Find here new facts and figures...

Download a button behavior that does all (?!?) necessary checks. (Updated 99/08/01)
••• Winner of the "Behavior Submission Contest" at mediamacros.com (8.99) •••

Still using Director 6? Try this nearly untested code (but read all the d7 stuff, too!)

Joachim Gola




 

 

 

 

Recent changes / additions (as of 4/2000)

With Director 7.02 you'll need the following Xtras: JavaConvert, Mix Services, Image Translator Helper, JPEG Export

The exporting movie has to be external – as Gretchen MacDowall stated. Verified.

Iren Gurarye added that the exporting movie must not be protected. Verified.

Lance Endres comments on this one: "I have found this to be untrue on Windows. The movie may be protected as a DXR or as a DCR but the extension on the document must be DIR. Apparently the naming system is the limitation to the JPEG export function." Not yet verified.

David Foster stated that in D 7.02 the BMP Agent Xtra may be necessary. Not verified for Windows, not true for Mac.

David Foster (and others) stated that only members from castlib 1 (standard internal castlib) may be exported. Verified. Baring that in mind you may simplify the above script line to:

  myinst.ExportMedia(item 1 of the movie, mymember, myfilepath, 1, myquality, 1)

Dave Pentin told me about a naming problem; he solved it by naming the exporting movie in 8.3 DOS convention. Not verfied for Windows, not true for Mac.

Dave Pentin suggests that if you're going to export some pictures (e.g. more than 10), it may be necessary NOT to instanciate the xtra for each export. "I am attempting to export 40+ images from my internal cast library but, every time I run it, my projector crashes out anywhere between the 1st and > 25th exported image with a fault in IML32.dll." - "Single instanciating of the xtra prior to the export sequence worked."




 

 

 

 

And a modest conclusion:

Obviously there is no fun without risk ;-) Especially true when working with undocumented software features. I've done some minor testing only on MacOS, and I only know from other users that it works on Windows, and nearly everybody had some problems. Finally all could be solved with the above suggestions, as far as I know.

Instead of using undocumented and not-really-tested features, you may think of trying one of these commercial xtras (no risk minimizing without money ;-):

f3export Xtra, web site

Not tested. Quite old (D 5)
BTW, there are sporadic errors cropping up with f3Export exporting JPEGs on Win98 systems. The methods described above are a good workaround for this (David Foster, Photerra).

DirectXport Xtra (DirectXtras), see PR release

Not tested

RavImageExporter (Ravi Singh), web site

Not yet released nor tested.




 

 

 

 

Director 6 does it this way:

on convertToJPEG mymember, myfilepath, myquality
  set myinst = new(xtra "JavaConvert")
  set the itemdelimiter = "."
  ConfigureTranslation (myinst, item 1 of the movie, 0, 0, 0, myquality, "", 0, 0, 0, 0)   
  
exportMedia (myinst, item 1 of the movie, mymember, myfilepath, 1)
  set myinst = 0
end

Be sure to do similar tests like the ones described above!

Joachim Gola




 


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