# We need a little education on Pixels and pixels/inch

We have been looking at the avatar requirements but can’s seem to agree what is meant by:

``````The pixel dimensions of the Avatar image must be 40x40
pixels, with an image resolution of 72 pixels/inch
``````

Does this meet the final image submitted must fit a 2880 X 2880 pixel dimension?
(4072) x (4072)

is a
40x40 pixel dimension @1dpi = 40x40 pixels
40x40 pixel dimension @2dpi = 80x80 pixels

As I understand it, pixels lack any actual dimensions so the PPI (pixels per inch) measurements are to do with the image format being used and the device it is being displayed/printed/rendered/used on.

Depending on the image program you are using and how it handles the format, you may never know about PPI and instead only care about the pixel height and width values.

40x40 pixels

It means it must be 40 pixels by 40 pixels. The 72 pixels/inch is an encoding thing (most programs should default to 72), meaning that your final image should be 40/72 inches by 40/72 inches.

So long and short: create a MSPaint or program of your choice blank canvas that is 40x40 pixels and color them in as fit?

That would definitely work. Make sure you save in an appropriate format for uploading.

The resulting file is only 1KB and our limit is 100KB.

Ours is a 1.8KB .png

Worst case is probably going to be around 8KB at the largest for TIFF or similar lossless format.

Yeah, the limit is really high. Keep in mind that due to how lossless compression works, if you have any repeated colors (you should if it’s a logo) then that’ll greatly reduce the file size.

Just for fun, is the max size acheivable? Each pixel is 4 integers from 0 to 255 (RGB and alpha because it’s a png), and 2^8 is 64, so 0 to 255 is 8 bits, or one byte. So 4 bytes per pixel time 40x40 pixels is 6400 bytes, or 6.4KB. Even with a bit of header information, I’m pretty sure it’s impossible to hit 100KB.

It takes quite a bit of effort to make a 1600 pixel image weigh 100KB.

PNG supports 64 bits per pixel, which would let you exceed 100KB if you don’t use compression.

EDIT: No it wouldn’t, I can’t math.

There are samples and tutorials in the “Making 8bit art” link here: https://www.firstinspires.org/2018-frc-teaser

It’s clear that the avatar is 40 pixels x 40 pixels.

Note that all of the sample avatars are greyscale, but the tutorials both talk about making color avatars.

These will probably be incorporated into the scoreboard. I suspect they might also be displayed at each driver’s station in addition to team numbers.

64 bits per pixel is 8 bytes, so that would just double my estimate, still not getting us close to 100. Did you mean 64 bits per channel per pixel?

How would they display the avatars at the driver station?

Nope, just failed at math (bit != byte)

The only way to hit 100KB would be to embed quite a lot of custom metadata in the file…

According to W3 PNG Specifications, it would be 64 bits per pixel for TrueColor + Alpha. Over 1600 pixels, that would be 12.8 KB, matching your (double) estimate.

Maybe small screens (i.e. not 7-segment displays) like the ones used in Cheesy Arena? I am on mobile right now and can’t find an image/video but I’m sure someone here can.

Cheapest would be to just put up a 480-line flat panel computer monitor and blow the avatar up to 480x480.

They could also put up a 40x40 LED matrix, driven by something like a Raspberry PI. But, the dimensions are a bit weird. Commercial matricies tend to be in powers of two – you can easily get a 16x16 or 32x32 or 64x64, but not a 40x40. You’d have to build THAT out of 25 8x8 units or something and then implement your own control circuitry.

``````with an image resolution of 72 pixels/inch.