need javascript coding for an image!

Discussion in 'JavaScript' started by suresh01, Jul 28, 2009.

  1. #1
    Hi friends,

    I need know how make a image rounded with the help of Javascript. If anyone knows the script please let me know. I have given a link below that shows the sample of how i need the image.

    zazzle.com/cr/design/pt-mug

    Please help!!!!!! :confused:
     
    suresh01, Jul 28, 2009 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    you can with webkit or canvas.
     
    dimitar christoff, Jul 28, 2009 IP
  3. Amator

    Amator Well-Known Member

    Messages:
    1,424
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Amator, Jul 29, 2009 IP
  4. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #4
    dimitar christoff, Jul 29, 2009 IP
  5. Amator

    Amator Well-Known Member

    Messages:
    1,424
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #5
    no it is not. what you are showing is CSS and possibly not compliant with all browsers.
     
    Amator, Jul 30, 2009 IP
  6. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #6
    the first one is not css, its javascript via canvas, which is supported by every browser (including IE through excanvas). his question is, is it possible to use javascript and the answer to that is, yes.

    the css tricks are also mostly browser compliant. the only one that's not is the CSS3 which is not supported throughout but is nice :)

    gd is a different way to do it but at the cost of server cpu time, it can be expensive. also, look at how jaggied it is, totally unacceptable as a solution.

    another thing you can do is have the 4 corners as .png with alpha channel and overlay them on top of the image with javascript or css. the possibilities are endless...
     
    dimitar christoff, Jul 30, 2009 IP