472,111 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

maximum size for imagecreatetruecolor()??

there seems to be a maximum size (in px) for images created with
imagecreatetruecolor (somewhere between 4000 px and 4500 px). if the
image is bigger than that size, the browser doesn't display it but
reports errors in the image.

is this maximum size inbuilt into php?

or

does it depend on my server config and if yes how can i read it?
tia, micha

Jul 17 '05 #1
2 6488
ch*********@web.de wrote:
there seems to be a maximum size (in px) for images created with
imagecreatetruecolor (somewhere between 4000 px and 4500 px). if the
image is bigger than that size, the browser doesn't display it but
reports errors in the image.

is this maximum size inbuilt into php?

or

does it depend on my server config and if yes how can i read it?
tia, micha


A full-colour 4096x4096 image occupies 48 MB (or 64 MB it it has an alpha
channel). My guess is this problem is not so much to do with a maximum image
size but rather the amount of memory allocated to the running of your
website. Either talk to your web hosts about getting it increased, or stop
using such enormous images.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #2

Philip Ronan wrote:
ch*********@web.de wrote:
there seems to be a maximum size (in px) for images created with
imagecreatetruecolor (somewhere between 4000 px and 4500 px). if the image is bigger than that size, the browser doesn't display it but
reports errors in the image.

is this maximum size inbuilt into php?

or

does it depend on my server config and if yes how can i read it?
tia, micha

A full-colour 4096x4096 image occupies 48 MB (or 64 MB it it has an

alpha channel). My guess is this problem is not so much to do with a maximum image size but rather the amount of memory allocated to the running of your
website. Either talk to your web hosts about getting it increased, or stop using such enormous images.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

yes, that occurred to me after posting. i had not thought about memory
at all, just followed the manuals recommendation to use
imagecreatetruecolor() instead of imagecreate(), even if i don't really
need true color images. works fine now with imagecreate.

thnaks, micha

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kums | last post: by
4 posts views Thread by Gregory Hassett | last post: by
3 posts views Thread by f.amann | last post: by
2 posts views Thread by Woody Ling | last post: by
reply views Thread by leo001 | last post: by

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.