SFML community forums

Help => Graphics => Topic started by: massive_potato on June 17, 2012, 09:52:21 pm

Title: Question Regarding Image Types
Post by: massive_potato on June 17, 2012, 09:52:21 pm
Is there any noticeable difference between image types? If I were to use either a .jpg file or a .png file, would one be faster than the other?
Title: Re: Question Regarding Image Types
Post by: eXpl0it3r on June 17, 2012, 10:36:14 pm
The only place where one can talk about speed and diffrent image types is when loading the image, since you normally don't need to load millions of images one can (mostly) ignore the small performance differences the loading processes could have, i.e. I have no idea but I'd say it doesn't matter.

On the other hand there's the diffrent encoding. PNG is a lossless format i.e. it doesn't lose any quality of the image, whereas the JPG is a format that will lose quality (if you don't save it right).
The only advantage JPG has over PNG is that it's filesize is smaller for bigger images.

I'd suggest to use PNG, for the reasons that it's lossless and supports alpha channel (i.e. transparency).
Title: Re: Question Regarding Image Types
Post by: massive_potato on June 18, 2012, 01:02:24 am
Thanks!