473,219 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,219 software developers and data experts.

ImageCreateFromPNG

I'm writing a php script with the gd library. I had everything working
wonderfully, however, all of the sudden, If i import two png's into one
image, the quality of the second png degrades very badly.

If I only use one, it looks fine. If i load one with
ImageCreateFromPNG and reference it twice, it looks fine. It's only
when I use ImageCreateFromPNG twice on two different files, the second
one looks awful. Any suggestions?

Jul 17 '05 #1
2 3424
rich wrote:
I'm writing a php script with the gd library. I had everything working
wonderfully, however, all of the sudden, If i import two png's into one
image, the quality of the second png degrades very badly.

If I only use one, it looks fine. If i load one with
ImageCreateFromPNG and reference it twice, it looks fine. It's only
when I use ImageCreateFromPNG twice on two different files, the second
one looks awful. Any suggestions?


You're trying to combine images with different colour tables.

Use imagecreatetruecolor() to make a 24-bit full-colour image, and paste
your PNGs into that.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #2
Excellent! That was it. Thank you much.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cecile Muller | last post by:
I've been trying to just open a png and display it, that way: <? header ("Content-type: image/png"); $im = imagecreatefrompng('empty.png'); imagepng($im); ?> But the transparency is not...
4
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the...
14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
8
by: Krzysztof Kujawski | last post by:
I'm trying to get an image to analize by imagecreatefrompng(http://www.domain.pl/png.php); The file png.php is generating a PNG file different for all logged users in domain (cookies are used in...
6
by: dan glenn | last post by:
PHP4.3.2, GD2 - I have found to my great dismay and consternation that if I load a jpg image , then save it as a PNG, the resulting PNG will actually work in a browser, but it can't be loaded again...
6
by: Darkbyte [Work] | last post by:
Hi everybody!!! I have a script (foo.php) which uses GD to create an image and sends it to the browser: <?php $img = imagecreatefrompng("mypng.png"); /* other stuff */ ...
3
by: toffee | last post by:
Hi all, not sure if this is possible in PHP - every couple of weeks; i get a few png files; which i th open in an image editor; add a text box with comments in the top right corner; save the...
1
by: visiperl | last post by:
Hi All, I'm pretty much at my wits end with vista IIS7 and php. I'm trying to get the gd library function imagecreatefrompng() function operating properly and have been unsuccessful. I've...
6
by: DarkLink | last post by:
Hey, Is there a way using PHP to get certain statistics from a specific website and arrange them on an image? (Yes, it is typically a dynamic image generator.)
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.