Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Base12  
#1 Posted : Friday, November 23, 2007 6:17:16 AM(UTC)
Base12

Rank: Member

Groups: Member
Joined: 11/6/2007(UTC)
Posts: 3

Hi, I really love this activex, unfortunately it's been
a crazy thing trying to figure out all the synttax for using it in Foxpro 9.
I figured out almost all the things I need, but there is one thing
that is unfortunate. I can't load the constants, so I am forced to
type what I need. The main problem is color. You list out the constants
in the help, but for some reason, they don't work when I convert them.

For example,

ColorRed = &hFFFF0000
When i convert this in Foxpro, the result is 4294901760 which GraphicMill says is over the limit
So, I use 0xFF0000 which equals 16711680, Graphics Mill accepts the number, but the background in the graphic looks like a bad TV lines(different colors, unblended). But, when i use this number of the
drawtext, it's red! It's fine. So whu when I plug it into the background color it does not work?

My question is, how can I make a solid background red image using decimal?
I even used the CreateRGB(255,0,0) values which returned -65536 which gave the same
muddy results. If I do not pass any parameter, I get clean white.

For example, on the FF0000, can I do some kind of math to apply the solid color or figure out
what Graphic mill wants as a number for specific colors?

I've attached the image.

Thanks,


Format24bppRgb = 21108744
ogm.Data.ColorManagement.DataProfile = "C:\windows\system32\spool\drivers\color\sRGB Color Space Profile.icm"
* this does not work: nColor = 0xFF0000
* this does not work: nColor = ogm.Color.CreateRgb(255,0,0)
* this does not work: nColor = 0xFF0000
ogm.CreateNew(780, 600, Format24bppRgb, nColor)
cNewFile = "test.jpg"
ogm.savetofile(cNewFile)
Base12 attached the following image(s):
sample.jpg
Base12  
#2 Posted : Friday, November 23, 2007 7:02:02 AM(UTC)
Base12

Rank: Member

Groups: Member
Joined: 11/6/2007(UTC)
Posts: 3

Ok, this is nuts.... I just loaded photoshop to do some editing and now the colors are working.
I'm using the CreateRGB() and now it works... This is strange.
I tried different colors and they now work. This one is blue back with red letters. The decimal value is below. Looks like a had a color profile glitch.
Base12 attached the following image(s):
sample2.jpg
Dmitry  
#3 Posted : Monday, November 26, 2007 8:09:46 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Great :) I looked at your sample image - color 16711680 in decimal is FF0000 in hex. It is pure red color, so it works correctly.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.