About Test Card

Test Card can generate a test pattern image at any resolution and display it either fullscreen or in a window. It is also possible to save the currently displayed image to a file.

The image can be used to determine if your monitor (or e.g. a TV your computer is connected to) is displaying pixel perfect image or if it does something funky to it.

License

Test Card is released under the GNU General Public License, version 2.

2016-04-13 10:58:05 UTC

Screenshots

An example rendered at 640x480:

Test Card at 640x480

Downloadable

Test card rendered in some common resolutions:

2016-04-13 10:52:02 UTC

Documentation

Pixel Perfect or 1:1 Mapping

Common problems with television sets are overscan and sharpening and/or other "image enhancements". Overscanning means the picture is scaled up so that the borders go off screen and the image becomes otherwise a bit blurry. With video that is ok, as that is the way video still works and there at least used to be garbage at the border that is not intented to be visible but in general computer usage that is not the case.

Obviously, if a television is doing any image filtering, or enhancements as they call it, the picture is not 100% what the computer sends to it. With some television sets, it can be difficult or impossible to disable all filtering. Monitors also often have sharpening but, at least, it usually defaults to off and there are clear settings for it. Of course, there are people, who like to have sharpening, but that should be optional.

It also used to be difficult to get the graphics card display exactly the native resolution of a LCD TV and then get the TV display it with 1:1 pixel mapping. (This is exactly the problem why I I originally made this program.) This is somewhat related to overscan but sometimes the image may be displayed in whatever position on/off screen.

Another newer problem with 4K or Ultra HD televisions is color subsampling. This is partially caused by the lag of bandwidth in HDMI (pre-2.0) for 4k picture with 4:4:4 subsampling (e.g. every pixel has its own color information) at 60Hz, and apparently the is television hardware and/or software that is simply incapable of handling the per pixel color information even if they have the required HDMI 2.0 connector and claim to be able to do it. Again, this is not a problem with video which is practically always subsampled (4:2:0) even on a BluRay disc.

Input lag - the delay caused by image processing done by a televison or a monitor - may also be a problem. But if you get the TV to work in a 60Hz mode (instead of 30Hz) you are probably fine. Of course, there are hardcore gamers and people in general that are super sensitive to this. (The 30Hz refresh rate is related to the limited HDMI bandwidth but input lag is a diffent thing.)

Interpretation of The Patterns

Any downscaling, non-integer upscaling, and most of the "enhancing" filters that TVs have, messes up the 50% halftones on the edges of the image. The horizontal and vertical lines of different widths (1, 2, 3, and 4 pixels) might help with checking this, too. (Analog consumer video signals, such as composite and S-video, can also lack the bandwidth to transmit full vertical or horizontal resolution, VGA shouldn't have that proglem.)

The wedges in the corners (1, 2, and 3 pixels) as well as the coarser green (5%) and yellow (10%) arrows allow estimating the amount of overscan there is, and there really shouldn't be any for a computer output. Btw, there is one black pixel in each corner by design.

There are some basic RGB color gradients and fully saturated color areas to determine if colors are at least in the right ball park and if there is some obvious color quantization (not full 24bit color). If some of the coolors are wrong, it might just be that a connector is a bit loose (happens in both analog and digital signals.)

If you have 1-to-1 pixel mapping (the haftones aren't at all smeary), you can also try to estimate your displays gamma value using the provided scale. Step back until you cannot see individual pixels and read the number at the point where the gray color matches the halftones. (Settings on your computer and on your display both affect this.)

The rasterized boxes just below the basic colored ones, can be used to determine chroma subsampling. On the left there should be pinkish, reddish, blueish, and a grayish boxes made of horizontal lines. On the righ side, there should be grayish, blueish, reddish, and pinkish boxes of vertical lines. If either side has just gray boxes you are experiencing 4:2:2 subsampling. If both sides are gray, you have 4:2:0 subsampling.

In the middle there is another type of subsampling indicator, if in any of the colored boxes the darker square in the bottom right disappears, your chroma is being subsampled. If there is a brighter column on the left or row on the top, it is only 4:2:2 but if neither is showing, it is 4:2:0.

Finally, you can see if the pixels are square or not by looking at the large gray should-be circle in the center of the image. You can measure its width and height if you like. Non-square native pixels are a bit odd thing but not necessary that bad for video if the aspect ratio is corrected by the video player.


Because the image is static, Test Card cannot be used to measure display input lag. It also lags many test patterns related to old analog signals and CRT displays often seen in traditional test cards because they seemed unnecessary to me with modern digital signals and LCD displays.

Using the Program

The available fullscreen resolutions are, of course, limited to what your monitor and graphics card are capable of displaying. In windowed mode - the -w WIDTHxHEIGHT argument - you can create the image at any size you want. The -s argument automatically saves the first generated image, and ´-q` automatically quits after the image is ready (not much use without -s.)

Keyboard commands:

The simulated modes show the mode name just under the large numbers for current resolution.

The saved images will be in Window bitmap format and have a name WIDTHxHEIGHT_MODE.bmp, for example, 640x480_RGB.bmp. They are saved to the current working directly.

2016-05-20 20:04:46 UTC

Download

Or you can clone it from: git clone https://git.gizmo.dy.fi/testcard.git

2017-10-01 19:53:29 UTC

Email

You can reach me via email at vaino (dot) helminen (at) gmail (dot) com.