OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: Drago888 on November 06, 2020, 12:07:55 pm
-
Dear experts,
Need to seek your guidance on how lodepng does the RGB encoding for true color 24 bits pixels?
Cos when using lodepng, some of the pictures will have their color wrong, whereas most have it correct. I believe that it is caused by the endianness which strangely is different for each image. I am treating lodepng as always storing as RGB.
Also, what is the purpose of lodepng?
Cos when I use SDL_Image only, all my images will be correct color. (As I can determine endianness from SDL_BYTEORDER)
Thanks in advance
-
Need to seek your guidance on how lodepng does the RGB encoding for true color 24 bits pixels?
don't know
Also, what is the purpose of lodepng?
Cos when I use SDL_Image only, all my images will be correct color. (As I can determine endianness from SDL_BYTEORDER)
The purpose of lodepng is to load PNGs correctly.
SDL_Image doesn't work correctly on all platforms, e.g. on OSX.
PS: that's also why PNGs are the only officially supported format in OXC/E, GIFs are not officially supported.
PPS: lodepng may be replaced by SDL_pnglite in the near future in OXCE (to be confirmed)
-
Thanks Meridian.
Hmm, since my project will not be for Mac, thus will be safe to use SDL_Image.
At least until I figure out the endianness and RGB mask for lodepng.
-
Seriously, don't use SDL_Image for pngs, it's based on an ancient libpng version and is buggy as hell.
SDL_pnglite is much better.
-
btw why you want load RGB image? right now OXCE support only 8bit graphics and ignore all palettes from loaded file.
-
Seriously, don't use SDL_Image for pngs, it's based on an ancient libpng version and is buggy as hell.
SDL_pnglite is much better.
Thanks, think had found the issues for my images. Thus switching back to using lodepng for png and sdl_image for others.
However, not sure if it is pertaining to the images I am using only or will work for other images.
For all 24 bits color, lodepng is working correctly (RGB). However, 32 bits images, I wrongly assume that it is getting ARGB. Change to RGBA and seems to be getting correct color. Hopefully it will work for all.
If there is no update here, it will be working well. Else will post another message upon finding other color distortion
-
btw why you want load RGB image? right now OXCE support only 8bit graphics and ignore all palettes from loaded file.
I am changing cutscenes and ufopaedia images to use true color 1280x800 pictures. Thus changing the codes. Had only completed cutscenes and ufopaedia craft, craft weapon, vehicle, items. Progress is way too slow than what I hope.
How good it is if I am such a good programmer as most here :(. Then will probably have completed it by now
-
I could say that this will be VERY hard in OXCE, current code is optimalzied for 8bit and changing this will make only mess in code.
You probably could have bigger chances in OXC as it still use mostly native SDL surfaces.
-
I could say that this will be VERY hard in OXCE, current code is optimalzied for 8bit and changing this will make only mess in code.
You probably could have bigger chances in OXC as it still use mostly native SDL surfaces.
Thanks. Still the mod that I am using (Xpiratez) is running on oxce.
And really can't stand the blocky looking pictures thus embarking to modify it for my own enjoyment of the game.