OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   CorelDRAW 12 ExportBitmap (http://forum.oberonplace.com/showthread.php?t=1150)

MrClark 14-09-2005 11:56

CorelDRAW 12 ExportBitmap
 
I'm upgrading my application from Corel DRAW 11 to 12 and exporting a Tiff file no longer works the same. I attempted to record the process of exporting a Tiff with the same options as I did manually and the files are not the same. As near as I can tell the recorded code does not include the thumbnail information.

Here is the recorded code
Code:

    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    Dim expflt As ExportFilter
    Dim pal As StructPaletteOptions
    Set pal = New StructPaletteOptions
    With pal
        .PaletteType = cdrPaletteUniform
        .DitherType = cdrDitherNone
    End With
    Set expflt = ActiveDocument.ExportBitmap("C:\Temp\Avatar_Script.tif", cdrTIFF, cdrSelection, cdrPalettedImage, 1200, 1073, 200, 200, cdrNormalAntiAliasing, False, False, True, False, cdrCompressionLZW, pal)
    expflt.Finish

And the resultant file is attached along with the manual file.

I know the record function is lacking but I cannot find any reference to fixing the problem.

Alex 14-09-2005 12:50

What do you mean by thumbnail information? I don't think that the recording is lacking anything as far as export is concerned. It should record everything correctly. But if it doesn't then there is a problem.

Can you explain more what is the difference in the resulting file between your manual export and the one produced through automation?

MrClark 14-09-2005 14:00

I guess the files didn't upload.

Try these;

Avatar_Script
Avatar_Manual

You will see there is a significant difference in both the file size and if you dump it to a hex editor or even notepad you will see a significant difference in the harder of each file. Both files were exported from the same CorelDRAW source file.

MrClark 14-09-2005 15:15

So I went back and used my old code from CorelDRAW 11

Code:

Dim opt As New StructExportOptions

With opt
    .AntiAliasingType = cdrNormalAntiAliasing
    .Compression = cdrCompressionLZW
    .Dithered = False
    .ImageType = cdrGrayscaleImage
    .MaintainAspect = False
    .MaintainLayers = False
    .Overwrite = True
    .ResolutionX = 200
    .ResolutionY = 200
    .SizeX = 2000
    .SizeY = 1580
    .Transparent = False
    .UseColorProfile = False
End With

ActiveDocument.Export "C:\temp\Avatar.tif", cdrTIFF, cdrCurrentPage, opt

And it produces the same file automated as is does manually with all of the necessary header information.

So I'm assuming we are still seeing a problem with the record function?


All times are GMT -5. The time now is 04:46.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com