Drawing on image with specific colour (ASP)

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

Joppe
Posts: 2
Joined: Sat Feb 07, 2004 8:39 pm

Drawing on image with specific colour (ASP)

Post by Joppe »

I want to draw a dot on a picture in an asp-page. I use this code:

Code: Select all

Set ctrl = server.createobject("GflAx193.GflAx")
  sPath = Server.MapPath("/grafik/")
  sPath = sPath & "\sverige.gif"
  ctrl.EnableLZW = true
  ctrl.LoadBitMap sPath

  ctrl.DrawPoint 15,15,7,RGB(0,0,0)
  
  response.contenttype = "image/gif"
  response.binarywrite ctrl.SendBinary
  set ctrl = nothing
This works ok, but I haven't figured out how to change color of that dot. The only values that seems to work is RGB(255,255,255) and RGB(0,0,0). Nothing in between.

So... How does this OLE_COLOR-thing work?
User avatar
xnview
Author of XnView
Posts: 44451
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: OLE_COLOR

Post by xnview »

Joppe wrote:I want to draw a dot on a picture in an asp-page. I use this code:
...
First, you have the 2.00 version of GFLAx. And your picture is in 256 colors, you must convert it in RGB before to draw on it.
Pierre.
Joppe
Posts: 2
Joined: Sat Feb 07, 2004 8:39 pm

Thanks!

Post by Joppe »

ctrl.ChangeColorDepth(Ax_ToTrueColors)

did it!

Thank you for your fast reply!