0 Replies Latest reply on Oct 19, 2012 10:59 AM by dmerrow

    CS5.1 VBScript .export method creates JPEG file with an invalid marker type

    dmerrow

      I have a vb script that opens a JPEG, creates a working document copy, resizes, etc. then uses the export method to export the image to a JPEG file.

       

      If I then try to open the exported JPEG in PS, I get the error "Could not complete your request because an unknown or invalid JPEG marker type is found."

       

      Here's a sample of the code..very simple:

      "...

      Set docRef = appRef.Open("originalfile.jpg")

      Set wrkDoc = docRef.duplicate("original_copy.jpg")

      with wrkdoc

           .resizeimage 500, , 72, 6

           .resizecanvas 600, wrkDoc.Height + 10, 5

           .export "newfile.jpg", 2

           .close 2

      end with

      .."

       

      Is there another step I need to take?