Can not find codec for 'jpg' image format Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Can not find codec for 'jpg' image format

Post by lonewolff »

Hi guys,

Long time no see. :D

I thought I'd have another play with Ogre, it has been a while and looks like many great things have been happening recently.

I'm starting from scratch to re-familiarise myself with the process and all is going well so farm but one minor hiccup. Textures aren't loading.
Ogre::ItemIdentityException::ItemIdentityException: Can not find codec for 'jpg' image format.
Is there a new process for loading resources or has something been left out of the SDK build that should be in there (i.e. FreeImage)

Any help would be greatly appreciated.

Thanks in advance 8)



Ogre Version: 1.11.2 (SDK version from download page)
Operating System: Windows 10 Home
Render System: DirectX 11

Code: Select all

[b](partial)[/b]

12:02:02: Mesh: Loading robot.mesh.
12:02:02: Skeleton: Loading robot.skeleton
12:02:02: Ogre::ItemIdentityException::ItemIdentityException: Can not find codec for 'jpg' image format.
Supported formats are: dds ktx pkm. in Codec::getCodec at c:\projects\ogre-bsrh7\ogremain\src\ogrecodec.cpp (line 66)
12:02:02: Error: loading texture 'r2skin.jpg'. Texture layer will be blank: Ogre::ItemIdentityException::ItemIdentityException: Can not find codec for 'jpg' image format.
Supported formats are: dds ktx pkm. in Codec::getCodec at c:\projects\ogre-bsrh7\ogremain\src\ogrecodec.cpp (line 66)
12:02:02: Ogre::ItemIdentityException::ItemIdentityException: Can not find codec for 'jpg' image format.
Supported formats are: dds ktx pkm. in Codec::getCodec at c:\projects\ogre-bsrh7\ogremain\src\ogrecodec.cpp (line 66)
12:02:02: Error: loading texture 'r2skin.jpg'. Texture layer will be blank: Ogre::ItemIdentityException::ItemIdentityException: Can not find codec for 'jpg' image format.
Supported formats are: dds ktx pkm. in Codec::getCodec at c:\projects\ogre-bsrh7\ogremain\src\ogrecodec.cpp (line 66)
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Can not find codec for 'jpg' image format

Post by Zonder »

I've not been following 1.x but there have been changes with the dependencies as I recollect might be worth checking the release notes.
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Re: Can not find codec for 'jpg' image format

Post by lonewolff »

Zonder wrote: Fri Sep 07, 2018 9:07 am I've not been following 1.x but there have been changes with the dependencies as I recollect might be worth checking the release notes.
Yeah, but this was done with the 'Pre-built SDK' so it should contain all of the dependencies already.

https://www.ogre3d.org/download/sdk
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Can not find codec for 'jpg' image format

Post by paroj »

ensure that Codec_STBI is being loaded. Also see https://github.com/OGRECave/ogre/blob/m ... re-changes
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Re: Can not find codec for 'jpg' image format

Post by lonewolff »

Cool, thanks. Didn't realise that a lot of things were now plug-ins (I am from the 1.02 onwards era).

I now have this;

Code: Select all

	root->loadPlugin("RenderSystem_Direct3D9");
	root->loadPlugin("Codec_STBI");
The RenderSystem is getting initialised correctly, but no sign of Codec_STBI being loaded. Giving the same error of no JPG codecs later on.

Code: Select all

11:40:03: Loading library RenderSystem_Direct3D9
11:40:03: Installing plugin: D3D9 RenderSystem
11:40:03: D3D9 : Direct3D9 Rendering Subsystem created.
I have the both the render system dll and the codec dll in the same folder also.


[edit]
Worked it out. Turns out you need to initialise the render system first before attempting to load the codec plug-in.
Post Reply