[Image-SIG] open tiff fil in wxImage directlye
Michele Petrazzo
michele.petrazzo at unipex.it
Tue Nov 8 16:12:21 CET 2005
James Hu wrote:
> Hi, all gurus,
>
>
>
> I need to display 16 bit tiff image on screen directly, but it
> doesn't work, only black or gray background shown, (converting from
> tiff to png first is not option though). I checked the document,
> which says wxImage can open tif!
This is not true, because I, with wxpython 2.6.x I can directly load a 8
bit tiff image into wxImage:
img = wx.Image("tiff_img.tiff", wx.BITMAP_TYPE_ANY)
>
> Any info or help will be appreciated greatly!!!
>
I think that the problem is that wx can't load 16 bit images,
The only solution that I found to work with 16 bit gray images are to
use freeimagepy (I'm the developer) that is a freeimage wrapper. That
library can load the 16 bit gray image and has other useful functions.
freeimagepy.sf.net
freeimage.sf.net
Michele
More information about the Image-SIG
mailing list