1 Reply Latest reply on Mar 10, 2011 11:16 AM by Michael L Hale

    Create a .avi from JPG

    fabiomapelli

      Hi all,

       

      i'm a newbie about run Photoshop command through VB script and I'm trouble about to create a .avi file from a jpg file.

       

      this is a part of my code ......

       

      appTemplate = New Application
              appTemplate.Visible = True
              appTemplate.DisplayDialogs = PsDialogModes.psDisplayNoDialogs
              appTemplate.PlaybackDisplayDialogs = PsDialogModes.psDisplayNoDialogs
              appTemplate.Preferences.RulerUnits = PsUnits.psPixels

       

              'load fake image for test
              FMVFiles(0) = "C:\templateCS5\FMV_LAYOUT.jpg"
              FMVFiles(1) = "C:\templateCS5\800440_fmv.jpg"

       

              'jpg options for save
              Dim jpgSaveOptions = CreateObject("Photoshop.JPEGSaveOptions")
              jpgSaveOptions.EmbedColorProfile = IIf(UCase(pConfig.EmbColorProfile) = "TRUE", True, False)  'true
              jpgSaveOptions.FormatOptions = pConfig.FormatOptions '1 for psStandardBaseline
              jpgSaveOptions.Matte = pConfig.FormatMatte '1 for psNoMatte
              jpgSaveOptions.Quality = 12

       

             'open image in Photoshop CS5

              currentFMV = appTemplate.Open(FMVFiles(0))
              currentPRD = appTemplate.Open(FMVFiles(1))

       

       

              currentPRD.ResizeImage(800, 800, , )


              currentPRD.ActiveLayer.duplicate(currentFMV)

       

              ' currentFMV.SaveAs("C:\templateCS5\test.jpg, jpgSaveOptions, , 2)

       

              currentPRD.Close(2)

       

              currentFMV.ActiveLayer.translate(220, -84)

       

              currentFMV.Flatten()

       

              currentFMV.ActiveLayer.AdjustLevels(0, 255, 1.0, 16, 231)

       

       

       

      'duplicate layer in order to be able to make an Export->RenderVideo

              currentFMV.ActiveLayer.duplicate(currentFMV)

       

              'to be insert render video command'

              'Here Missing vb code to export to .avi file with Video render options!!!!!

       

       

       

       

      Thanks in advance for any help.

       

      Fabio