← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/buildicon_playercolors into lp:widelands

 

const Image& anim_frame = g_gr->animations().get_animation(descr.get_animation("idle"))
.representative_image(RGBColor(0, 0, 0));

well, here was the problem. You construct an image with playercolor black, always. I changed it to use the true player color. 

While doing that I also checked the differences in the resized image - and they look awful. The menu.png images are much prettier - especially noticable in the big buildings. I think the zoomSurface method is not cutting it really - we need something fancier that does proper filtering. The plus side is that we then can get rid of the SDLgfx dependency which we only use for resizing. The downside is that we need to add another library or roll our own - keep in mind that we also need to upscale sometimes (menus). I think this is really important, but can be done after this is merged - however if this is merged, it needs to be done and soonish. 

This looks sophisticated:
http://www.codeproject.com/Articles/11143/Image-Resizing-outperform-GDI

This should give some ideas:
http://stackoverflow.com/questions/3086770/what-algorithms-to-use-for-image-downsizing


-- 
https://code.launchpad.net/~widelands-dev/widelands/buildicon_playercolors/+merge/211401
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/buildicon_playercolors into lp:widelands.


References