Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grey out part of image using ASPImage.

Status
Not open for further replies.

lily1

Programmer
Mar 13, 2004
17
0
0
US
Is it possible to grey out part of image(in square shape) by using ASPImage? I would appreciate if you can give me some sample code.
Thanks for any help!
 
i believe you can, by specifying fill area and using a template so basically, template = original image, fill are is new image generated as an overlay


the information on how to do alot of this is in the documentation and there is a good 30 sum odd sample files included with the object.

[thumbsup2]DreX
aKa - Robert
 
Thanks for reply, Drexor, I checked ASPImage's official site, and could only found one sample code.I never use these features before. Could you please tell me a little more about how to specifying fill area and using template?.Or can you give me the url where I can find the helpful sample code?
Thanks again!
 
will post later as i dont have a license on this machine to install/test.

[thumbsup2]DreX
aKa - Robert
 
my apologies for not getting your response as quickly as i had hoped, when i returned home my machine descided to be extremely uncooperative. and in the process of getting all my software re-installed, will get you a response as soon as possible, thanks.


[thumbsup2]DreX
aKa - Robert
 
ok .. with asp image..
Code:
    ImageName = "SomeImage"
    ImageExt = ".jpg"
    Set Image = Server.CreateObject("AspImage.Image")
    Image.LoadImage(Server.mappath(ImageName & ImageExt))
    Image.PenColor = vbGray
    Image.FillRect(intLeft, intTop, intRight, intBottom)
    Image.FileName = Server.Mappath(ImageName & "_GrayBox" & ImageExt)
    If Image.SaveImage Then
      Response.Write "Image Creation Successful<br><img src='" & ImageName & "_GrayBox" & ImageExt & "'><br>"
    Else
      Response.Write "Image Creation <b>Failed : </b> & Image.Error & "<br>"
    End If
    Set Image = nothing

that should get you going the only thing you should need to specify is the image name/extention and the intTop/Bottom/Left/Right these are pixel locations just like an image map.

hopefully that helps, and again .. sorry for the delay on the reply.

[thumbsup2]DreX
aKa - Robert
 
Many thanks, DreXor, it is very helpful. :))

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top