Current location: Hot Scripts Forums » Programming Languages » PHP » gd image library bug?


gd image library bug?

Reply
  #1 (permalink)  
Old 10-02-04, 11:39 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation gd image library bug?

hi.. i was working on a resize script.. it resizes them and works really good.. exept for one thing.. all transparent areas of the picture show up black after resize..
is there anyone else haveing the same problem or is it just me?

yea.. and im running windows XP, php 5.0.1 with built in gd2

Last edited by <?Wille?>; 10-02-04 at 11:40 AM. Reason: sys info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-02-04, 11:40 AM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
what do you mean by transparent areas...?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-02-04, 11:53 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
say you create a image with protoshop.. say its a ball.. then you leave the surrounding area (corners) blank.. then if you put it on a not white bg on the net the surrounding area witch you left transparent will show as the bgcolor
hope im not too messy about what im trying to explain..

ok heres a example.. when your adding a thread or post here in this forum.. theres alot of icons below.. the arrow pic is transparent around the arrow.. heres the pic i got after resize.. its not correctly in scale but it will do.. everything black on this pic should be 'nocolor' -> transparent
Attached Images
File Type: gif icon2.gif (2.8 KB, 78 views)

Last edited by <?Wille?>; 10-02-04 at 12:02 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 10-02-04, 12:11 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
=/ I would say do what i do, and avoid .gif's... I usually design in flat background color or i find crafty ways to not have to use transparent back grounds... .png for teh win! sorry i cant b of much help i guess in this area heh...

ooooo.....what you could do though is adjust the image dementions in the html that should keep the transparency in tact =D
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 10-02-04, 12:20 PM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
avoid gif's yea.. but the problem with that is that its used for users that upload their images and then if the image is too big it will be resized to fit the site.. and i cant just simply say gif is not allowed since its a very common image type.. thanks for trying tho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 10-02-04, 11:20 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
while GIF is common it usually does not have blank spaces.. i mean what inda pics are being uploaded? =)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 10-03-04, 02:37 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nova912
while GIF is common it usually does not have blank spaces.. i mean what inda pics are being uploaded? =)
profile pic's..
yea i know.. they dont have blank spaces.. but then if someone has a pic with blank space..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
searching image nurqeen PHP 4 07-09-05 10:35 AM
how to draw an image inside a table? davidklonski HTML/XHTML/XML 2 07-06-04 11:27 AM
php GD libary mavoric PHP 3 06-10-04 05:05 PM
need help with upload image and getting image name to db mikewooten PHP 3 05-14-04 05:52 PM
how to change text dynamically with image? rabbit51 JavaScript 1 02-23-04 09:35 AM


All times are GMT -5. The time now is 12:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.