wxStaticBitmap and save tiff

I have an application that work with wx 2.6 on win. When I try to save
(SaveFile method) a wxstaticbitmap to a tiff file, I receive this error
that on wx 2.4 I don't receive:

11:51:04: tiff module: image
11:51:04: LZW compression is not available to due to Unisys patent enforcement
11:51:04: TIFF: Error writing image.

Is there a solution for save into tif format ?

Thanks,
Michele

Michele Petrazzo wrote:

I have an application that work with wx 2.6 on win. When I try to save
(SaveFile method) a wxstaticbitmap to a tiff file, I receive this error
that on wx 2.4 I don't receive:

11:51:04: tiff module: image
11:51:04: LZW compression is not available to due to Unisys patent enforcement
11:51:04: TIFF: Error writing image.

Is there a solution for save into tif format ?

I think that this would work:

1. convert your bitmap to a wx.Image.
2. Call image.SetOptionInt( wx.IMAGE_OPTION_COMPRESSION, 0)
3. call image.SaveFile

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hello Michele,

Monday, May 30, 2005, 11:53:06 AM, you wrote:

I have an application that work with wx 2.6 on win. When I try to save
(SaveFile method) a wxstaticbitmap to a tiff file, I receive this error
that on wx 2.4 I don't receive:

11:51:04: tiff module: image
11:51:04: LZW compression is not available to due to Unisys patent
enforcement
11:51:04: TIFF: Error writing image.

This is the old 'LZW is patend-pending' thing ...
Still, you can always take the stram and LZW it yourself. An LZW
definition along with a python demo script can be found here:
http://pandora.iu-bremen.de/~bliebald/term_papers/lzw.pdf
But why make things complicated?
Give FreeImage library a shot:
http://freeimage.sourceforge.net/features.html
There are python bindings and examples ...

Hope this helps a little,

CHeers,
the_shelter mailto:pdftex@the-shelter.de

Robin Dunn wrote:

Michele Petrazzo wrote:

I have an application that work with wx 2.6 on win. When I try to save
(SaveFile method) a wxstaticbitmap to a tiff file, I receive this error
that on wx 2.4 I don't receive:

11:51:04: tiff module: image
11:51:04: LZW compression is not available to due to Unisys patent enforcement
11:51:04: TIFF: Error writing image.

Is there a solution for save into tif format ?

I think that this would work:

1. convert your bitmap to a wx.Image.
2. Call image.SetOptionInt( wx.IMAGE_OPTION_COMPRESSION, 0)
3. call image.SaveFile

This don't work, I receive the same error.
Thanks,
Michele

the_shelter wrote:

But why make things complicated?

I don't want to complicate my life... For this reason I'm using wx!

Give FreeImage library a shot: http://freeimage.sourceforge.net/features.html There are python
bindings and examples ...

Where ?
Into the changelog I see that on "December 2th 2000" they add
freeimagepy, but on "June 11th 2001" they remove this project!

See:
http://sourceforge.net/project/shownotes.php?release_id=101902

And into the sources I don't find any comment about python. I don't
think create a wrapper for python, for example with ctypes, is the
better solution for me.

Thanks,
Michele

Michele Petrazzo wrote:

Robin Dunn wrote:

Michele Petrazzo wrote:

I have an application that work with wx 2.6 on win. When I try to save
(SaveFile method) a wxstaticbitmap to a tiff file, I receive this error
that on wx 2.4 I don't receive:

11:51:04: tiff module: image
11:51:04: LZW compression is not available to due to Unisys patent enforcement
11:51:04: TIFF: Error writing image.

Is there a solution for save into tif format ?

I think that this would work:

1. convert your bitmap to a wx.Image.
2. Call image.SetOptionInt( wx.IMAGE_OPTION_COMPRESSION, 0)
3. call image.SaveFile

This don't work, I receive the same error.

Ok, I'll take a closer look at the sources.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!