72 dpi/96dpi problem[Solved]

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

kili
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Fri Apr 27, 2007 06:17

72 dpi/96dpi problem[Solved]

Postby kili » Fri Sep 19, 2008 06:38

We cut the image's edge very accurately:(this is only TaharezLook example)
Image

different with TaharezLook's imageset:
//some offset
Image

but when we use the image to be tiled, it's edge stretched like this:
Image

out artist said that's because of CEGUI us 96 dpi to render the image,
but we use 72 dpi to output the TGA image, so it got enlarged.

so i replaced the code

Code: Select all

virtual   uint   getHorzScreenDPI(void) const   {return 96;}
virtual   uint   getVertScreenDPI(void) const   {return 96;}

with

Code: Select all

virtual   uint   getHorzScreenDPI(void) const   {return 72;}
virtual   uint   getVertScreenDPI(void) const   {return 72;}

in openglrenderer.h and use the new dll in CELayoutEditor,
but the image still stretched as the last image.
is there any resolution besides cutting the image with some offset?
Last edited by kili on Tue Sep 30, 2008 01:42, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Sep 23, 2008 08:40

Hi,

I'm not absolutely certain of the issue you're seeing :? But could it be the Imageset autoscaling that is causing the issue? If you change this option, either within the editor or by editing the XML to change the Autoscaled attribute to "False" - perhaps this might help?

Also, which renderer is this using?

CE

kili
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Fri Apr 27, 2007 06:17

Postby kili » Wed Sep 24, 2008 08:07

Hi,

i added

Code: Select all

<Property name="Autoscaled" value="False" />

in StaticImage, but seems no use.

the only way i could do is cut it more.
our artist said maybe the alpha rendering problem,
i'll keep trying.

the renderer is OpenGL(CELayoutEditor) and DX9(my ap).

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sun Sep 28, 2008 13:47

The "AutoScaled" is an attribute that goes in the Imageset definition, it's not a window setting.

For example, you might currently see

Code: Select all

<Imageset Name="TaharezLook" Imagefile="TaharezLook.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">


This might be changed to

Code: Select all

<Imageset Name="TaharezLook" Imagefile="TaharezLook.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="False">


CE.

kili
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Fri Apr 27, 2007 06:17

Postby kili » Tue Sep 30, 2008 01:42

Thanks CE.
This resolved my problem. :D

by the way, it should be "false" :oops:


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 53 guests