user3054720
user3054720

Reputation: 21

Better JPG or BMP?

This might be a stupid question, but I'm curious.

I'm creating a game where I'm going to need a lot of images. Now I want to know which format is better to use? JPG or BMP? Which uses more memory, or which format will the program process faster?

Upvotes: 1

Views: 690

Answers (3)

OopsUser
OopsUser

Reputation: 4784

From my experience of game developing you would probably want to use PNG.

  • PNG is compressed
  • PNG is losseless
  • And the most important part, PNG has opacity.. you need opacity because otherwise any character in the game that isn't square would have white corners (or other color that you will use as background).

Good luck with the game

Upvotes: 5

Gusdor
Gusdor

Reputation: 14334

Short answer: Bitmap

The tradeoff here is speed vs disk space.

  • Bitmap is fast to use as it does not need decompressing but big on disk and memory
  • Jpeg is small on disk/memory but slighly slower to load. You may also suffer compression artifacts.

If I was going to use a compressed format, i would use png as it is lossless.

EDIT: after decompression Jpeg will use roughly the same memory as a bitmap.

Upvotes: 4

CodeCaster
CodeCaster

Reputation: 151584

Please define "a lot of images".

Which uses more memory or which format will the program process faster?

It doesn't really matter, as an image has to be uncompressed anyway to do anything with it. The image format you use probably isn't going to be the bottleneck anyway if you're creating your game in WinForms.

Upvotes: 1

Related Questions