StelTexture.cpp   StelTexture.cpp 
skipping to change at line 196 skipping to change at line 196
glLoad(); glLoad();
} }
/************************************************************************* /*************************************************************************
Return the width and heigth of the texture in pixels Return the width and heigth of the texture in pixels
*************************************************************************/ *************************************************************************/
bool StelTexture::getDimensions(int &awidth, int &aheight) bool StelTexture::getDimensions(int &awidth, int &aheight)
{ {
if (width<0 || height<0) if (width<0 || height<0)
{ {
// Try to get the size from the file without loading data if (!qImage.isNull())
QImageReader im(fullPath);
if (!im.canRead())
{ {
return false; width = qImage.width();
height = qImage.height();
}
else
{
// Try to get the size from the file without loading
data
QImageReader im(fullPath);
if (!im.canRead())
{
return false;
}
QSize size = im.size();
width = size.width();
height = size.height();
} }
QSize size = im.size();
width = size.width();
height = size.height();
} }
awidth = width; awidth = width;
aheight = height; aheight = height;
return true; return true;
} }
// Load the image data // Load the image data
bool StelTexture::imageLoad() bool StelTexture::imageLoad()
{ {
if (downloadedData.isEmpty()) if (downloadedData.isEmpty())
 End of changes. 3 change blocks. 
7 lines changed or deleted 16 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/