Latest Posts

Topic: Remove dependency to jpeg

aber

Topic Opener
Joined: 2010-04-18, 17:45
Posts: 52
Ranking
Likes to be here
Posted at: 2010-11-06, 16:06

The library is currently used to load background images in menus and loading screens.
We talk about 9 menu background pictures and around 20 nice looking pictures.
A lot of these pictures are nature pictures. I don't think they have a special value for the game.
I think it should be possible to make the game menu more png friendly. For loading screens it might be possible to use the rendering engine to create new material.


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-11-06, 17:04

Widelands does not use libjpeg directly. There was a (unnecessary) dependency on libjpeg before the spice-up-cmake was merged. Now jpeg is only used through SDL_image. I think SDL_image supports jpeg in almost all cases. Is there any good reason why a SDL_image without jpeg support should be used? I see no reason why we should remove jpegs from widelands.


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-11-06, 17:54

Agreed. We use PNG mainly because of its lossless compression, which is appropriate for in-game graphics. JPEG is a much more appropriate graphics format for the background loading images.


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-11-07, 12:12

fullscreen png images are much, much bigger than fullscreen jpeg images, sizewise. No reason not to use jpeg were appropriate, or is there?


Top Quote
aber

Topic Opener
Joined: 2010-04-18, 17:45
Posts: 52
Ranking
Likes to be here
Posted at: 2010-11-07, 13:11

Very strong opinions in favor of libjpeg. face-smile.png
It works to load fixed sized images as background, but it feels weird in terms of aspect ratio and resolution independence.
I had the feeling this is not a loved feature. Using different size pictures, having the same picture two times inside the installation. One exported as png.
Some pictures... „worlds/desert/pics/loading_00.jpg“.
My idea was not to replace this pictures with png images. I was thinking about a new development iteration, which could remove the different background pictures for different menus and thus make it easier to improve, change the user interface. Using a different loading screen, more related to widelands, easier to recognize.


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-11-07, 13:20

aber wrote: It works to load fixed sized images as background, but it feels weird in terms of aspect ratio and resolution independence. I had the feeling this is not a loved feature. Using different size pictures, having the same picture two times inside the installation. One exported as png.

I don not get your point. What has this to do with jpeg or png? Png is as resolution and aspect ratio restricted as jpeg... Jpeg is an image format which is appropriate for some types of graphics. I see no reason why we should remove jpeg loading support from widelands. Actually we make no difference between image formats. We just hand the file name to SDL_image. Internally all graphics are treated the same way. I heard no argument against jpeg as an image format.


Top Quote