Rendering image quality

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Isgalvotas
Posts: 13
Joined: Mon Oct 31, 2005 8:58 pm
Location: Lithuania
Contact:

Rendering image quality

Post 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:
Image
hybrid

Post 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.
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post 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.
Post Reply