createImagesetFromImageFile() image is blurry
Posted: Tue Feb 10, 2009 10:45
I'm having a problem using createImagesetFromImageFile(). It seems that it's compressing my image for some reason, and I don't understand what's happening.
Here's the graphic I'm using:
Here's the code I am using to bring the PNG into my application:
Here is the code in my layout xml file to put it on the screen:
Here's how it looks in my application:
Obviously this doesn't look nearly as nice as the original graphic. Does anyone know why this is happening, and how I can make the image look crisp in CEGUI, just like in the original graphic file?
Thanks in advance!
Here's the graphic I'm using:
Here's the code I am using to bring the PNG into my application:
Code: Select all
CEGUI::Imageset* imgset;
imgset = CEGUI::ImagesetManager::getSingletonPtr()->createImagesetFromImageFile("logo", "logo.png");
imgset->setAutoScalingEnabled(false);
imgset->setNativeResolution(CEGUI::Size(247, 46));
Here is the code in my layout xml file to put it on the screen:
Code: Select all
<Window Type="CyberLook/StaticImage" Name="logo">
<Property Name="UnifiedPosition" Value="{{0,17},{0,18}}" />
<Property Name="UnifiedSize" Value="{{0,257},{0,56}}" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="Disabled" Value="False" />
<Property Name="Image" Value="set:logo image:full_image" />
<Property Name="VertFormatting" Value="LeftAligned" />
<Property Name="HorzFormatting" Value="TopAligned" />
<Property Name="Alpha" Value="1" />
<Property Name="FrameEnabled" Value="True" />
</Window>
Here's how it looks in my application:
Obviously this doesn't look nearly as nice as the original graphic. Does anyone know why this is happening, and how I can make the image look crisp in CEGUI, just like in the original graphic file?
Thanks in advance!