Jump to content


Photo

how to display image in a round rectangle


  • Please log in to reply
11 replies to this topic

#1 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 09 May 2006 - 01:36 PM

[!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]I saw some site that display images in a round rectangle instead of ordinary sharp rectangle any one know how to do that with scripts, I do not want of course to modify every image I have to be inside rounded frame

thanks[!--sizec--][/span][!--/sizec--]

#2 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 09 May 2006 - 01:43 PM

well there probally ways of doing this with java.

or you could as u said to edit each image and round off each edges leaving the backgorund bit as transparent and save as png... that would work
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#3 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 09 May 2006 - 01:50 PM

using PHP or java script only please[size=4]

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 09 May 2006 - 01:54 PM

The best way to achieve this is to do it with a graphics editor or with CSS (using some tricky methods found on alistapart.com or with the new CSS method which you won't find supported until the next level of CSS is supported in browsers).

Either way, I don't think this is a PHP question any longer and Javascript certainly won't help you. I will leave it open, but I don't think anyone is going to be able to help you with a PHP solution.

Info: PHP Manual


#5 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 09 May 2006 - 02:10 PM

unless with a script that would edit all the images giving them a rounded off edge
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#6 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 09 May 2006 - 02:12 PM

If you made a script like that, you could probably sell it. But how often are you going to have an image behind an entire object area? Most often you're going to have 2 images... one that is at the top of a block that has the top 2 edges rounded and then another image that handles the bottom.

Unless you setup the script to do a variety of options, I don't think that's a good idea. Plus, you're dealing with image quality and so on. This would be much easier to handle in an image editor.

EDIT: also, the OP is talking about rounding the edges of something like a DIV.... which isn't an image to begin with.

This is quickly becoming a non PHP issue. Convince me otherwise or this will quickly be moved/closed.

Info: PHP Manual


#7 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 09 May 2006 - 02:44 PM

yes I wish that CCS has a round rect for "clip" method why they did not htink of that ?
any way thanks for the effort


#8 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 09 May 2006 - 02:47 PM

It will in the future.

Info: PHP Manual


#9 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 10 May 2006 - 07:12 AM

[!--quoteo(post=372602:date=May 9 2006, 03:12 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 9 2006, 03:12 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
If you made a script like that, you could probably sell it.
[/quote]

Now there's a challenge. Got my thinking cap on.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#10 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 10 May 2006 - 11:28 AM

[!--quoteo(post=372842:date=May 10 2006, 08:12 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 10 2006, 08:12 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Now there's a challenge. Got my thinking cap on.
[/quote]
Well there is such a script! Its called Nifty Courners and requires no images and a small amount of CSS! Its done by javascript. The javascript does all the work for you.

[div align=\"center\"][!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--][a href=\"http://www.html.it/articoli/nifty/index.html\" target=\"_blank\"]Nifty Couners[/a][!--sizec--][/span][!--/sizec--][/div]

I think I might have a little play with this later, oh and its free.

If you want to do in pure CSS then take [a href=\"http://www.google.co.uk/search?client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial_s&hl=en&q=rounded+corners+in+CSS&meta=&btnG=Google+Search\" target=\"_blank\"]your pic here[/a] for whole load of articles/tutorials on doing so.

#11 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 10 May 2006 - 11:52 AM

How about a php class to acomplish that

[a href=\"http://www.phpclasses.org/browse/package/2681.html\" target=\"_blank\"]http://www.phpclasses.org/browse/package/2681.html[/a]

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]With PhpMyBorder you can add round corner borders. The first version of PhpMyBorder generates round corner images (gifs) 'on the fly' and caches them to improve performance. The newest version of PhpMyBorder creates the round border effect by CSS2 (without any images at all). The newest version also support raised and shadowed borders.[/quote]

Lite...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#12 isaac_cm

isaac_cm
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 11 May 2006 - 10:15 AM

you are really php freaks there is nothing impossible to the members of this forum :) I am very happy to find this forum , my thanks to every one




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users