Page 1 of 1

Rendering image quality

Posted: Sat Feb 04, 2006 8:12 pm
by Isgalvotas
Hi everyone,

I want to display image on screen, but somehow it's quality drops then render with Irrlicht, look:
[img]
http://img150.imageshack.us/my.php?image=screen9wj.jpg
[/img]

The real quality of image is this:
[img]
http://img138.imageshack.us/my.php?image=logo0py.jpg
[/img]

As I saw thread before my, where was suggestion of scaling image I tried and it don't do any difference.
I use code:

Code: Select all

logoInGame = driver->getTexture("./data/logo_resize_resize.jpg");
driver->makeColorKeyTexture(logoInGame, core::position2d<s32>(50,10));

and in while(device->run())
driver->draw2DImage(logoInGame, core::position2d<s32>(500,500),core::rect<s32>(0,0,300,100),0,video::SColor(255,255,255,255), true);

Hope someone knows a solution. :roll:

Posted: Sat Feb 04, 2006 8:29 pm
by hybrid
What about a size of 2^n times 2^m which helps the texture engine. You can also disable mipmapping, but it would only save space, I think.

Posted: Sat Feb 04, 2006 8:36 pm
by Baal Cadar
Isgalvotas, the problem is the colour keying. What looks like black in the logo is not all the same black. There are gradients in it. When you use colour keying, you have to make sure the pixel you pick the colour from is the same, you want to remove from the image, the same to the bit, but some of what seems black (0x000000) is actually just almost black (like for instance 0x000002)

Rework the image in the image manipulation tool of your choice, or create a real alpha-channel in it (preferred)

Edit: Maybe the black in the pic originally was all black. But if this is a jpg picture, then you need to be aware, that colours in a jpg are not stable. Jpg is not losslessly compressed. For things like logos or anything you need colour keying for, use a lossless texture format, like png.