OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 17-12-2008, 02:38
Jeff Harrison
Posts: n/a
Default count colors in PP

Is there any way to count all discreet hues in a file?

purpose is to help users determine if there are 256 hues or less at a glance, so user would consider GIF before jpeg.

Funny that this stat is not shown in doc properties...

Shelby was kind enough to make this code: but as you can see it maxes out based on a palette.

Sub Jeffisarockindude()
    Dim pal As Palette
    Dim intCount As Integer

    Set pal = ActiveDocument.CreatePaletteFromVisible("test", Environ("Temp") & "\test.cpl", True)
    intCount = pal.ColorCount

    MsgBox "Jeff's wonderful picture has: " & intCount & " color(s)"
End Sub

Last edited by Jeff Harrison; 17-12-2008 at 15:15.
Reply With Quote

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
Change colors cmjmmrp General 0 02-04-2007 07:17
Count objects in active selection on master layer knowbodynow CorelDRAW/Corel DESIGNER VBA 7 27-02-2007 21:48
Count objects in selection (VBA, Corel Draw 9) korner CorelDRAW/Corel DESIGNER VBA 1 04-10-2004 09:11
PP12 tools count = 0 Michael Cervantes Corel Photo-Paint VBA 0 29-05-2004 23:09
looping until documents.count = 0 bbolte CorelDRAW/Corel DESIGNER VBA 18 18-02-2003 15:03

All times are GMT -5. The time now is 17:02.

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