Re: [pygtk] vtk problem with libpng

2003-10-15 Thread John Hunter
 John == John Hunter [EMAIL PROTECTED] writes:

John It's not clear to me importing vtk would change the libpng
John that gtk is linking with.

David Thompson, on the VTK mailing list, advised me to compile 
with VTK_USE_SYSTEM_PNG turned ON, as well as

VTK_USE_SYSTEM_EXPAT
VTK_USE_SYSTEM_JPEG
VTK_USE_SYSTEM_TIFF
VTK_USE_SYSTEM_ZLIB

which worked.  These options are exposed by cmake -i if you request to
see the advanced options.

JDH
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] vtk problem with libpng

2003-10-14 Thread John Hunter

[ I have been having trouble with my pygtk mailing list subscription
and am resending this since it bounced the first time.  Apologies for
any duplicates]


I am developing an application which uses vtk with pygtk-2.0.0.  When
I import vtk (whether or not I use it), my stock gtk icons no longer
work under redhat 9, and I get errors like the following

  (toolbar_test.py:23182): Gtk-WARNING **: Error loading icon: Failed to load image 
'/usr/share/icons/Bluecurve/24x24/stock/gtk-new.png': Fatal error in PNG image file: 
Incompatible libpng version in
application and library

With the same version of VTK and pygtk, I had no problems under redhat
linux 8 (I just upgraded the OS) so it looks like a incompatibility
between a new libpng and a png lib that ships with VTK.  I am not sure
how to proceed in fixing it, so I'm looking for suggestions.

Below is a test script which replicates the problem.  When you comment
out the import vtk line, the error messages go away and the icons
display fine.

It's not clear to me importing vtk would change the libpng that gtk is
linking with.

Any suggestions welcome,
John Hunter

Version info
python 2.3
VTK-4.3-2003-08-13 snapshot
pygtk-2.0.0
redhat linux 9

Test script:

import pygtk
pygtk.require('2.0')
import gtk

import vtk


toolbar = gtk.Toolbar()

iconSize = gtk.ICON_SIZE_SMALL_TOOLBAR

def dummy(button): pass

iconw = gtk.Image() 
iconw.set_from_stock(gtk.STOCK_NEW, iconSize)
buttonNew = toolbar.append_item(
'New',
'Load new 3d image',
'Private',
iconw,
dummy)

iconw = gtk.Image()
iconw.set_from_stock(gtk.STOCK_QUIT, iconSize)
buttonQuit = toolbar.append_item(
'Quit',
'Quit program',
'Private',
iconw,
lambda button: gtk.mainquit())

toolbar.show()
win = gtk.Window()
win.show()
win.add(toolbar)

gtk.mainloop()


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/