473,396 Members | 2,076 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,396 software developers and data experts.

PNG maximum dimensions?

I'm using a php script to generate a huge number of PNG image files.
Some of the larger PNGs are not viewable in a web browser, though-they
just show up as broken links. These ones are only viewable in
Photoshop and usually need to be cut down to around 30,000px tall (I
forget the exact number). Is this a limitation of the PNG format?
What are the maximum dimensions of a PNG image?

Nov 12 '07 #1
5 16926

<go*********@gmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
I'm using a php script to generate a huge number of PNG image files.
Some of the larger PNGs are not viewable in a web browser, though-they
just show up as broken links. These ones are only viewable in
Photoshop and usually need to be cut down to around 30,000px tall (I
forget the exact number). Is this a limitation of the PNG format?
What are the maximum dimensions of a PNG image?
Hi,
do you have any idea of how much memory those imgs take when displayed?

R.
Nov 13 '07 #2
Hi,
do you have any idea of how much memory those imgs take when displayed?

R.
Sure. They are all very simple 8 bit pngs. Few of them take up more
than 500kB.

Nov 14 '07 #3
go*********@gmail.com wrote:
>
I'm using a php script to generate a huge number of PNG image files.
Some of the larger PNGs are not viewable in a web browser, though-they
just show up as broken links. These ones are only viewable in
Photoshop and usually need to be cut down to around 30,000px tall (I
forget the exact number). Is this a limitation of the PNG format?
What are the maximum dimensions of a PNG image?
How many web browsers have you tested, and on what platforms?

The PNG format uses a 32-bit field to store the width and height, so that's
not the problem. However, GDI in Windows uses signed 16-bit values in some
cases for physical coordinates, which limits you to 32,767.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Nov 14 '07 #4
I've tested Firefox, Safari and IE on Windows.

I guess I left out another detail, too. The app I use to create these
images "fails" halfway through creation of the PNG files, but only if
the length of the image is less than 16000px (the values could be
higher, this is just where I arbitrarily decided to split the files
into two. This app "failing" actually creates a perfect PNG image,
but as mentioned in a previous post, is only viewable to me in Adobe
PhotoShop. It's also worth noting that when the file is open in
PhotoShop, it cannot be saved back into PNG format-only BMP and other
less-desirable formats. The only way PhotoShop can save the file is
to divide it into ~30,000px parts.

I think you've answered my question with the maximum dimension being
32767. I'm just posting this bit to add to the discussion.

Thanks for the help!
On Nov 14, 2:17 am, Tim Roberts <t...@probo.comwrote:
>
How many web browsers have you tested, and on what platforms?

The PNG format uses a 32-bit field to store the width and height, so that's
not the problem. However, GDI in Windows uses signed 16-bit values in some
cases for physical coordinates, which limits you to 32,767.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

Nov 14 '07 #5
Hi again,

assuming a square image, 1 image of 30000 pix would need around
30.000 * 30.000 / 1024 /1024 = 859 MB of memory to be displayed

A 24 bit = 2.7 GB of memory
A 32 bit = 3.6 GB

I am surprised that Photoshop can even open that...!
Can I ask what you need those images for? And how you manage to create them
in PHP?

R.

<go*********@gmail.comwrote in message
news:11**********************@o80g2000hse.googlegr oups.com...
I've tested Firefox, Safari and IE on Windows.

I guess I left out another detail, too. The app I use to create these
images "fails" halfway through creation of the PNG files, but only if
the length of the image is less than 16000px (the values could be
higher, this is just where I arbitrarily decided to split the files
into two. This app "failing" actually creates a perfect PNG image,
but as mentioned in a previous post, is only viewable to me in Adobe
PhotoShop. It's also worth noting that when the file is open in
PhotoShop, it cannot be saved back into PNG format-only BMP and other
less-desirable formats. The only way PhotoShop can save the file is
to divide it into ~30,000px parts.

I think you've answered my question with the maximum dimension being
32767. I'm just posting this bit to add to the discussion.

Thanks for the help!
On Nov 14, 2:17 am, Tim Roberts <t...@probo.comwrote:
>>
How many web browsers have you tested, and on what platforms?

The PNG format uses a 32-bit field to store the width and height, so
that's
not the problem. However, GDI in Windows uses signed 16-bit values in
some
cases for physical coordinates, which limits you to 32,767.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


Nov 14 '07 #6

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

Similar topics

5
by: John | last post by:
I am rotating images at one location of my web site. My problem is if I set the width and height of the new image before I show the new image, the old image is stretched first to the new image...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
11
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I've noticed a few threads (full of sound and fury, signifying nothing) here recently about allocation of large memory blocks. I'm about to start on a personal pet project where I'll be using...
5
by: VMI | last post by:
How can I increase the maximum size of a Windows form? I'm trying to make a really big Windows form (about 1000x1000) but the designer doesn't allow me to do that. It only goes up to 1000x780....
6
by: MurrayTh | last post by:
Is there any way to determine the dimensions of an image using the image's URL? ie load image based on URL, and then get dimensions? or perhaps better method?
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
1
by: johnrees | last post by:
I am building a photo gallery using code which creates thumbnails of a specific size from any image. When clicked the thumbnail expands dynamically to a pre-determined size. The sizes of the...
1
by: Mentat | last post by:
In the description below ??? marks specific problem areas. Any help is appreciated. Required ======== A method to detect the width and height values of a <DIV... element. Since there are two...
3
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
hello, is it possible to resize an image with same proportion. having a maximum height and a maximum width. the solution should work on main browsers (do not use max-height and max-width). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.