50% transparent png with PHP... no chance?

This is a discussion on "50% transparent png with PHP... no chance?" within the PHP Forum section. This forum, and the thread "50% transparent png with PHP... no chance? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 25th, 2008, 06:59
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Age: 23
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
50% transparent png with PHP... no chance?

Hey folks!

I've a little problem here. I want to dynamically create a png image with PHP. the image should be 50% transparent!
I think it is not possible with PHP...

When you create a image with imagecreate(width,height) it is completely black. So you can only draw on that black background...

If you make that background transparent with imagecolortransparent the image is completely transparent. But when you add a 50% opaque rectangle, it is based on a black background. (a white rectangle simply gets grey...).

WTF!

Does somebody have an idea?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 25th, 2008, 13:11
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: 50% transparent png with PHP... no chance?

Wouldn't it be easier to create the image using photoshop/fireworks, and then use CSS for placing in in your site.

Also do you have a link to your site that we can look at?
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 25th, 2008, 13:12
CloudedVision's Avatar
Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,265
Blog Entries: 9
Thanks: 2
Thanked 40 Times in 40 Posts
Re: 50% transparent png with PHP... no chance?

What browser are you using? IE6 doesn't display PNG transparency, it has a grey background behind it. I would use a gif and use CSS to make it 50% transparent instead of a PNG for cross-browser support.
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 26th, 2008, 20:59
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: 50% transparent png with PHP... no chance?

How about create the base (semi transparent PNG) in photoshop and paint over it in PHP?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent PNG files geyids Graphics and 3D 2 Apr 17th, 2008 12:15
Transparent .png and IE6 andrewlondon Graphics and 3D 9 Sep 4th, 2007 13:12
Second Chance Sunday(Monday) acrikey Webforumz Cafe 10 May 30th, 2007 16:42
any chance someone can look at this for me please Accurax PHP Forum 3 Dec 9th, 2006 21:30
transparent background krazykrisi Web Page Design 1 Aug 25th, 2005 08:51


All times are GMT. The time now is 16:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42