OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-04-2003, 05:02
adriano
Guest
 
Posts: n/a
Default Example for Gif Export

Has anybody an working example for an export to gif-format ?
I don't understand how to use the transparent Parameter.
Reply With Quote
  #2  
Old 10-04-2003, 20:03
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Example for Gif Export

Here is an example (Photo-Paint 11):

Code:
Sub ExportToGIF()
    Dim flt As Object
    Dim pal As New StructPaletteOptions
    Dim i As Long
    
    pal.NumColors = 32
    pal.PaletteType = cdrPaletteOptimized
    pal.DitherType = cdrDitherNone
    
    Set flt = ActiveDocument.Export("C:\Pic.gif", cdrGIF, , pal)
    flt.Transparency = 0 'gifNone
    ' Look for white in the image palette and make it transparent
    For i = 1 To flt.NumColors
        If flt.PaletteColor(i) = RGB(255, 255, 255) Then
            flt.Transparency = 1 'gifImageColor
            flt.ColorIndex = i
            Exit For
        End If
    Next i
    flt.Finish
End Sub
You can find more information about using export filters here: http://www.oberonplace.com/vba/exportex.htm (the document is for Draw, but it still applies to Photo-Paint).

I hope this helps.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CorelDraw 10 DXF export relative coordinates - VBA solution? asb617 CorelDRAW/Corel DESIGNER VBA 2 01-04-2010 02:34
HPGL export problem Anonymous General 1 16-02-2006 09:15
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 14:28
quick export in vc++ andrej CorelDRAW/Corel DESIGNER VBA 2 11-07-2003 04:05
Export for Web adriano Corel Photo-Paint VBA 1 10-04-2003 19:48


All times are GMT -5. The time now is 07:57.


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