I have a script that loops through all graphics inside an adobe indesign document. The script senses what type of graphic file it is (JPEG, TIFF, EPS, PSD, etc), and, based on some simple rules, the graphic will get exported as either a JPEG, or a PNG.
For source graphics that have the POTENTIAL to have transparent pixels in them (TIFF, EPS, et al), the export format is set to PNG. For all others, the export format is set to JPEG.
This has been running quite well for some time now, until I switched over a development server to CS6. It was just discovered, this morning, that graphics w/transparent pixies get exported as a PNG, but, where my transparency USED TO BE, I now see a big ugly piece of white. It's terrible.
I've scoured the documentation looking for an answer. Suprisingly, I see a new batch of PNGExportPreferences that I didn't have available to me in CS5.5, but, none of these seems to do the trick. The one that stands out to me is app.pngExportPreference.transparentBackground = true. The documentation for this property is a bit ambiguous in my particular use-case, and, sadly, doesn't seem to do the trick. I'm still seeing a big ol' white blob where I would expect to see transparency.
The basic syntax for what I'm doing is:
NEVERMIND. I am an idiot. The script is running fine. the .transparentBackground setting IS the trick. I just completely FAILED to remember, until now, that MS's paint program cannot handle transparency. I was viewing the exported graphic in Paint. SUCH an idiot.