PNG Loading

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

wondersye
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Sun May 22, 2011 16:04

PNG Loading

Postby wondersye » Fri Jun 03, 2011 10:27

Hello,

Just suggesting to document a bit more that, AFAIK:

- you need a specific image codec to run Samples (ex: Demo6); otherwise we have:

Code: Select all

03/06/2011 11:35:40 (Std)     Attempting to create Imageset 'cegui_logo' using image file 'logo.png'.
03/06/2011 11:35:40 (Error)    CEGUI::RendererException in file CEGUIOpenGLTexture.cpp(139) : OpenGLTexture::loadFromFile - TGAImageCodec - Official TGA image codec failed to load image 'logo.png'.
(indeed we should not expect the TGA codec to read PNG, however the error message could be clearer, ex: "failed to load image 'logo.png' PNG format not supported by TGA codec; one must enable PNG codec support at CEGUI's configuration-time" or alike)

- apparently FreeImage is to be preferred to DevIL to be preferred to SILLY?

- I was wondering whether SDL_image is/could be supported as well?

- I had to install GLUT for the Samples (

Code: Select all

apt-get install libglut3-dev libglut3
), got bitten by this

Finally, I will later investigate to know whether images can be read from buffers/"abstract I/O streams", when direct loading from a filesystem is not possible (ex: when using abstract filesystems like PhysicsFS).

Thanks for this very useful library,
Best regards,

Olivier Boudeville.

PS: minor hint to enable the use of a prefixed install of freetype:

Code: Select all

   export freetype2_CFLAGS="-I${freetype_PREFIX}/include -I${freetype_PREFIX}/include/freetype2"
   export freetype2_LIBS="-L${freetype_PREFIX}/lib -lfreetype"

(before configuration)

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: PNG Loading

Postby Kulik » Fri Jun 03, 2011 14:14

Yeah I agree this isn't completely idiot proofed :wink:

Having a special warning about this would require us to implement a special case in the code to handle this. This is not something I like the sound of. Especially since you can provide your own ImageCodec and use it with the stock CEGUI samples.
Maybe blacklisting the TGA codec would help, that said IIRC we planned to even strip TGAImageCodec from 0.8 altogether to lessen maintenance pain (nobody is using just TGA now anyways).

I myself use FreeImage but it is kind of hated in the Linux community (they don't use system libraries and instead pack their own, Windows application style). It works great though. It's really up to you what you will use. The greatest strength of the whole abstraction is that you can use Ogre image loading facilities directly in CEGUI for example.

wondersye
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Sun May 22, 2011 16:04

Re: PNG Loading

Postby wondersye » Sat Jun 04, 2011 10:23

Hi Kulik,

Thanks for your answer. I am opting to use FreeImage, however I just see that apparently there is no way of specifying where a FreeImage install should be found?

I have to install it in a non-system (prefixed) directory, and saw that there are *_CFLAGS and *_LIBS for a lot of prerequisites...but not for FreeImage ? Could it be added?

Best regards,

Olivier Boudeville.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: PNG Loading

Postby Kulik » Sun Jun 05, 2011 10:34

It definitely could be added, thanks for the problem spotting. However as I said we have already migrated to an entirely different cmake build system in 0.8 and we are not sure whether we will even release 0.7.6 SDK (there are some fixes so it might be worth it though).

I guess unless you intend to get your hands dirty and patch this, this might not happen, depending on whether I or CE get spare time to do this. Maybe add this to the mantis tracker so it doesn't get forgotten.

wondersye
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Sun May 22, 2011 16:04

Re: PNG Loading

Postby wondersye » Sun Jun 05, 2011 11:06

Thank you again. As indeed it is probably not of paramount priority, I think I will send a bug report and/or a patch iff the newer 0.8 build will not allow it.

Best regards,

Olivier.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 10 guests