I have a macro to export each page as a JPG. But there are some instances where some elements are PNG layers with transparencies and I think my export settings are causing an error. See the bottom shadow of the bottles.
'Exports jpg Set expflt = ActiveDocument.ExportBitmap(path, cdrJPEG, cdrSelection, cdrRGBColorImage, 0, 0, 300, 300, cdrNormalAntiAliasing, False, True, True, False, cdrCompressionNone) With expflt .Smoothing = 50 .Compression = 15 .Finish End With
JPG does not support transparencies. If you're on a white background just flatten before exporting.
I know. I'm not trying to export a transparent jpg. There are transparent png elements in the file that when I try to export the jpg it causes errors on the pngs.
My God do you really think that PNG elements imported into a file that's saved as a JPG remain PNG capabilities?
You need serious study on file formats?
Ok you don't need to be toxic.
Hey Jamie,
Does this content work as you would expect it to if you manually export to .JPG in CorelDRAW?
How about if you use my Quick Export macro?
Your quick export macro works great and exports a jpg with no errors on the png elements. I wonder what jpg setting I'm missing with my macro.
AHHH my Transparent As Boolean was set to True. I changed it to false and the png elements look correct now.
'Exports jpg Set expflt = ActiveDocument.ExportBitmap(path, cdrJPEG, cdrSelection, cdrRGBColorImage, 0, 0, 300, 300, cdrNormalAntiAliasing, False, False, True, False, cdrCompressionNone) With expflt .Smoothing = 50 .Compression = 15 .Finish End With End If
Hey, that's good news!
My macro uses ActiveDocument.ExportEx, so the options are set using an ExportFilter.
For .JPG export, I don't specify anything for transparency, so I would guess it uses the default of "false".