Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PNG image problem in compiling
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed
View previous topic :: View next topic  
Author Message
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Wed Feb 23, 2011 9:34 am    Post subject: PNG image problem in compiling Reply with quote

Hello

I noticed that when compiling a program like a game
including sprites in PNG, the program does
not start. I am forced to convert images in BMP or JPG.
Is this normal?
While Aview displays PNG images without problem.
(must be converted with a program like GIMP to keep
mask to avoid a white or black background in the animations)

Thank you in advance for your answers.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Wed Feb 23, 2011 4:15 pm    Post subject: Reply with quote

When compiling software, you need to make sure that all its dependencies are available. In this case, you probably need to install the LibPNG library:

http://web.syllable.org/Syllable/resources.html

The main way to find dependencies is to read the build documentation of the software. There may also be errors or warnings in the output during compilation. Image libraries are often skipped without a real error failure if they're not found.

Many libraries on Syllable Desktop are not available in their dynamic form yet. That means that the static form of LibPNG is compiled into Syllable tools such as the viewer. Thus, LibPNG is included in Syllable without it being available for newly compiled software, until you install it.

This is most probably not a bug, so I'll move it to the regular forum.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Thu Feb 24, 2011 4:21 am    Post subject: Reply with quote

I had already installed libPNG before compilation. But this
nothing has changed. Then I uninstalled libPNG provided
with Syllable and I compiled a newer version of libpng.
But it's the same. In fact the software works only if
images are in a different format.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Thu Feb 24, 2011 9:47 am    Post subject: Reply with quote

Odd. Did you follow the official installation procedure for resource packages?

What do you mean by uninstalling the LibPNG provided with Syllable? As far as I remember, there isn't any separate package.

On what software does this happen? Are there any messages in the build output regarding LibPNG?

Some packages can't find some libraries automatically. It's possible that you need to configure them with explicit paths to LibPNG. This is usually done with a configure command. Try this in their source directories:

configure --help
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Thu Feb 24, 2011 11:15 am    Post subject: Reply with quote

To be honest, I downloaded all the packages available
on your site to have the necessary dependencies.

So to install libpng: unzip libpng-1.2.14-1.i586.resource -d /resources
then: package register libpng
To uninstall: package unregister libpng

I remember one software after compiling posted an error like:
"Your SDL does not support this image format"
indicating PNG images.
I do not remember what software.

If you have a little time, please, can you compile this source? it takes a few seconds here.
Normally you should have the same mistake as me.
http://olofson.net/download/pig-1.0.tar.gz

thank you it's nice to answer me
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Thu Feb 24, 2011 7:57 pm    Post subject: Reply with quote

Hm, that sounds indeed like there's a bug in our SDL configuration in 0.6.6. I do know there are such problems in 0.6.6 that are fixed in the development build, but I don't think we've had a report about PNG support before.

I'll move this back to Bugs, and I'll try that source code next week, after the ReBorCon conference we're organising.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Fri Feb 25, 2011 4:05 am    Post subject: Reply with quote

Ok I continue to search on the web, sometimes
there is the same error on Linux is like that
I could compile some sources in Syllable.
Otherwise I convert all images in JPG format
and software work seamlessly.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Fri Feb 25, 2011 5:09 pm    Post subject: Reply with quote

It sounds like LibPNG is not compiled into SDL, which would require SDL to be replaced.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Sun Feb 27, 2011 4:55 am    Post subject: Reply with quote

In fact I realized there was a problem Compatibility between SDL and libpng when
I started to compile Grafx2, a clone of Deluxe Paint. At the end of compilation,
I got an error with libpng. That's when I decided to uninstall libPNG provided
with Syllable and I replaced it with a version higher. I always had another error
with libpng. I think once the compatibility restored, Grafx2 will work under Syllable.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Sun Feb 27, 2011 6:36 am    Post subject: Reply with quote

Wouldn't this be a matter of Grafx2 needing a newer LibPNG? Again, there is no separate LibPNG included in Syllable Desktop, so you can't replace it.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Sun Feb 27, 2011 9:21 am    Post subject: Reply with quote

I do not see why LibPNG can not be replaced as it can do on Linux.
What are the differences between Linux and Syllable at this level ?
LibPNG is it independent of SDL on Syllable ?
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Sun Feb 27, 2011 7:04 pm    Post subject: Reply with quote

As I said above, many libraries don't have dynamic versions on Syllable Desktop. So they're compiled statically into each program that uses them. So if LibPNG is not in SDL-Image, you have to replace SDL-Image.

On Linux, and Syllable Server, libraries are usually shared, so you could replace the separate LibPNG library.
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Sat Mar 19, 2011 5:00 pm    Post subject: Reply with quote

Sorry, I've been very busy, and I forgot about this for a while.

I tried Pig, and it's a typical example of the issues that can be encountered when porting SDL software. You already found some of them. I wrote a Builder recipe to automate the process:

http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/Pig-1.0/

There are several issues that only apply to Syllable 0.6.6, so there's an overlay recipe for it:

http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/Syllable/Pig-1.0/

The Syllable development build is much better at compiling SDL programs (but the current development build doesn't include SDL-Image). Once compiled, Pig indeed can't load its PNG images, so your bug report seems to be confirmed. I don't know if it is fixed yet, due to the current omission of SDL-Image from the development build.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Sun Mar 20, 2011 6:16 am    Post subject: Reply with quote

OK Thank you. When I opened this post, I had already downloaded approximately
Two gigabytes of sources to be compiled for Syllable. I preview that developers used now exclusively the PNG format , in fact the correction in SDL_image is very important.
Right now, I am a little busy with the blog and I begin To advertise on the forums. There is a few days I began to compile Audio Jack connection and that not
Work completely because Headers are missing as "soundcard.h". But I managed to compile up to the end without error.
I think I'll open a post for this. It would be nice if we could adapt Jack under Syllable.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Wed Mar 23, 2011 1:48 pm    Post subject: Reply with quote

I've got Pig working with its original PNG images, but a series of fixes was needed. Besides PNG support, SDL-Image doesn't have TIFF support, either. I'm working on integrating the fixes properly with the system.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group