Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SaveForWeb file size difference of scripted versus manually created

Guest
May 22, 2009 May 22, 2009

I've got a VB script that uses Save For Web to make thumbnail images from a folder of larger images.  Most perplexing is the file size difference of these thumbnails using the script versus making them one by one manually.

The thumbnails are 180x120 pixels.  Using Save for Web from the file menu to manually create jpegs (50 quality, optimized, no profile, no progressive) the typical resultant file sizes are 9 to 14 KB.  Using the script, the file sizes end up from 20KB to 30KB!  Additionally, if the original file has any metadata (caption, contact info, copyright, etc) the manual process strips all the metadata out except the copyright notice, which is fine.  Using the script however, all metadata remains intact!!

Can anyone explain why this is occurring?  I'd sure like the smallest file size possible.  Am I missing a parameter in the ExportSaveForWeb options?

Here's this save section of the code:

     Dim sfwOptions As New ExportOptionsSaveForWeb

     sfwOptions.Format = psJPEGSave
     sfwOptions.Quality = 50
     sfwOptions.Optimized = True
     sfwOptions.IncludeProfile = False

     SaveFile = OutputFolder & ImageNumber & ".jpg"
     docRef.Export SaveFile, PsExportType.psSaveForWeb, sfwOptions

Thanks in advance for any insights and guidance.

(BTW, I get a similar file size disparity with javascript too although they end up a tad smaller than the VB script, go figure...)

Tom

PS - The VB Scripting Guide has the wrong name for the Export Document method.  It is not "ExportDocument" but rather, simply "Export".  Hopefully this tip will save someone hours and hours of frustration and confusion 😉

TOPICS
Actions and scripting
929
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guest
Jun 08, 2009 Jun 08, 2009

Eureka, I found the issue!  Now pass the Propecia...

In the options in the Save for Web window (the two small gray arrows next to the Preset drop down list), on one of the panels there is a checkbox to Preserve Metadata.  This was unchecked.  Apparently, it was not seen as unchecked when running the script yet behaved accordingly when I did a manual save.  Checking this box and clicking apply, run a manual save, then unchecking the box and clicking apply appeared to "reset" it to not save metadata (other than copyright info) either when saving manually or then using the script.

Case closed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jun 08, 2009 Jun 08, 2009
LATEST

That must be a VB issue. It doesn't seem to happen with JS

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines