Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Question Regarding Image Types  (Read 1170 times)

0 Members and 1 Guest are viewing this topic.

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Question Regarding Image Types
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Question Regarding Image Types
« Reply #1 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).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Question Regarding Image Types
« Reply #2 on: June 18, 2012, 01:02:24 am »
Thanks!