Displaying an Avatar

Most people that use my Steamworks library only want to do a few basic things. One of those is showing an avatar.

Easy Way

The simple answer is:

If you want to set the SteamID dynamically you need to do something like:

Manual Way

The manual way is basically just looking at the above component and seeing what it does.

Request The Avatar


What’s in the Image

  • Width + Height– size of the image in pixels
  • Id – Steam’s internal image id (not Steam Id)
  • Data – array of bytes, 0-255 representing the colours.
  • GetPixel( x, y ) – convenience function, lets you get the Color of a pixel at x, y


You can manually read from Data if the convenience class is too dumb for you and you want to do something smarter.

The data is laid out RGBA. Here’s how GetPixel reads a pixel.

One thought on “Displaying an Avatar

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s