Billboard-resolution, TGA format limitation

Started by
10 comments, last by taby 4 years, 11 months ago

Unfortunately, the Targa TGA format only supports widths and heights up to 65535 pixels (or, 5.55 metres at 300 pixels per inch), stored as a couple of short unsigned ints in the TGA header data.

Do you have experience with a simple format that doesn't have such a limitation?

Advertisement

Are you sure you need this? Images of that dimension easily run into the gigabytes and might choke up the average computer. You also likely want to use compression on such a thing, which kind of eliminates the 'easy' options.


Not sure what you're aiming at but it's probably more manageable if you cut it up in sections and use a library that works with a more common format (TGA is rather old and superseded). Decoding file formats is a nice exercise but usually a waste of time.

Yeah Photoshop is bad enough at eating all my RAM without trying to load a 16GB TGA file... ?

If a game needs textures bigger than that, you'll probably need to build a system that lets you edit it as small sections before assembling the full image, so that artists don't need a terrabyte of RAM in their development PCs.

Then, seeing as you're now doing custom tooling, you could also just use a modified TGA with 32bit width/height fields?

What is the use case, out of interest? :) 

Another vote for a tiled or some other approach here. Aside from the GB used, with flat images that size, you are going to be killing your caches too presumably as going from 1 y line to the next will likely be > 256K, and how are you going to edit it?

19 hours ago, taby said:

widths and heights up to 65535 pixels (or, 5.55 metres at 300 pixels per inch)

In the real world, billboards aren't printed at 300 ppi.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Thanks for the information, all.

I will just use multiple TGA files if I ever need to go beyond 5.55 metres.

It also turns out that the BMP format uses a long unsigned int for storing the number of pixels per dimension, and the limit is like 363.64 kilometres at 300 ppi.

I wonder what the ppi for the Fremont Street Experience is... and man, that canopy is long! 8th Wonder.

24 minutes ago, taby said:

I wonder what the ppi for the Fremont Street Experience is... and man, that canopy is long! 8th Wonder.

According to the official numbers, it works out to just 1 pixel per inch.

Which is still pretty ridiculous, given how big it is.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

@swiftcoder -- Sweet!

@lawnjelly -- The use case is to create a print, and display that art on an actual billboard.

@Hodgman -- Yes, there is always the option of creating a new format. Thanks for pointing that out, it's very handy.

3 hours ago, taby said:

and the limit is like 363.64 kilometres at 300 ppi.

That's a 75 exabyte image, by the way.

In practice very few prints go even into the max size of a TGA file - print costs scale even faster than memory costs, making it economically problematic to print even multi-gigabyte images at full resolution.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement