Hi,
Does anyone know if GIF format of pictures is supported in
wxpython?
Thanks for reply
Ladislav
I have a application which draws stuff, including text, to a DC (a
wxPanel). I'm using the dc::SetUserScale function to do zooming. On
wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
UserScale I set. However, if I draw rotated text with a non-zero
rotation, the text scales correctly. This problem is not apparent on
wxMSW.
Am I missing something, or is this a real wxGTK problem. (I appreciate
there are no TT-fonts in GTK, but the wx-documents indicate I should see
at least approximate scaling of font-sizes using SetUserScale. I don't
see any!). Anyone out there got a suggestion for an elegant workaround.
thanks,
Bryan
I don't know what you mean "supported", but this works very good:
wxImage("mydir/myimage.gif",BITMAP_TYPE_GIF)
If you need it to be bitmap (wxBitmap) somewhere you can just call
wxImage.ConvertToBitmap()
···
On Mon, 1 Jul 2002, A wrote:
Hi,
Does anyone know if GIF format of pictures is supported in
wxpython?
Thanks for reply
Ladislav
--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net
In my case I have wxMemoryDC on which I'm actually doing drawing, and then
in OnPaint event handler I wxDC.Blit() from this memory DC to the wxPaintDC,
which I create in this event handler (I guess you are doing something like that
too)
And if I call SetUserScale() on wxPaintDC AFTER Blit() than there is no scaling
at all (this is obvious ) But if I call it BEFORE Blit Than all figures and
FONTs are scaled properly. (There are another problem in my case -- odd stuff
appears on the screen except figures But all fonts are scaled fine!)
···
On 1 Jul 2002, bryan cole wrote:
I have a application which draws stuff, including text, to a DC (a
wxPanel). I'm using the dc::SetUserScale function to do zooming. On
wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
UserScale I set. However, if I draw rotated text with a non-zero
rotation, the text scales correctly. This problem is not apparent on
wxMSW.Am I missing something, or is this a real wxGTK problem. (I appreciate
there are no TT-fonts in GTK, but the wx-documents indicate I should see
at least approximate scaling of font-sizes using SetUserScale. I don't
see any!). Anyone out there got a suggestion for an elegant workaround.
--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net
Maybe he means writing as well: you cannot write GIFs, just
read them. I am sure that this is due to licensing issues regarding
the compression algo used in GIFs.
···
#--------------------------------
Jeff Sasmor
jeff@sasmor.com
----- Original Message -----
From: "Maxim Slojko" <maxx@pearl.dgap.mipt.ru>
To: <wxpython-users@lists.wxwindows.org>
Sent: Monday, July 01, 2002 6:26 AM
Subject: Re: [wxPython] Is GIF format supported
On Mon, 1 Jul 2002, A wrote:
Hi,
Does anyone know if GIF format of pictures is supported in
wxpython?
Thanks for reply
Ladislav
I don't know what you mean "supported", but this works very good:
wxImage("mydir/myimage.gif",BITMAP_TYPE_GIF)
If you need it to be bitmap (wxBitmap) somewhere you can just call
wxImage.ConvertToBitmap()
--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
Do you SetUserScale before drawing to the MemoryDC or before blitting to
the PaintDC? (I.e. are you trying to set the UserScale to draw to the
memoryDC or to blit to the PaintDC?) If you do the later, then
presumably you would get errors as you need to extrapolate/interpolate
the bitmap area to different sizes.
As far as my problem goes, I'm going to see is my fonts scale correctly
when drawing to a memoryDC (instead of the PaintDC).
Bryan
···
On Mon, 2002-07-01 at 11:41, Maxim Slojko wrote:
On 1 Jul 2002, bryan cole wrote:
> I have a application which draws stuff, including text, to a DC (a
> wxPanel). I'm using the dc::SetUserScale function to do zooming. On
> wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
> UserScale I set. However, if I draw rotated text with a non-zero
> rotation, the text scales correctly. This problem is not apparent on
> wxMSW.
>
> Am I missing something, or is this a real wxGTK problem. (I appreciate
> there are no TT-fonts in GTK, but the wx-documents indicate I should see
> at least approximate scaling of font-sizes using SetUserScale. I don't
> see any!). Anyone out there got a suggestion for an elegant workaround.
>In my case I have wxMemoryDC on which I'm actually doing drawing, and then
in OnPaint event handler I wxDC.Blit() from this memory DC to the wxPaintDC,
which I create in this event handler (I guess you are doing something like that
too)
And if I call SetUserScale() on wxPaintDC AFTER Blit() than there is no scaling
at all (this is obvious ) But if I call it BEFORE Blit Than all figures and
FONTs are scaled properly. (There are another problem in my case -- odd stuff
appears on the screen except figures But all fonts are scaled fine!)--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
Bryan Cole
Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge
CB4 0WG, United Kingdom.
tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382
Do you SetUserScale before drawing to the MemoryDC or before blitting to
the PaintDC? (I.e. are you trying to set the UserScale to draw to the
memoryDC or to blit to the PaintDC?) If you do the later, then
presumably you would get errors as you need to extrapolate/interpolate
the bitmap area to different sizes.
I'm SetUserScale()'ing on PaintDC before blitting it from the memory DC.
For memory DC there is no UserScale -- it is as is.
For Paint DC in the OnPaint event handler I'm doing something like that:
dc.SetUserScale(sc,sc)
dc.Blit(...) # Blitting from existing memory DC. And all fonts are scaled fine
···
On 1 Jul 2002, bryan cole wrote:
As far as my problem goes, I'm going to see is my fonts scale correctly
when drawing to a memoryDC (instead of the PaintDC).Bryan
On Mon, 2002-07-01 at 11:41, Maxim Slojko wrote:
> On 1 Jul 2002, bryan cole wrote:
>
> > I have a application which draws stuff, including text, to a DC (a
> > wxPanel). I'm using the dc::SetUserScale function to do zooming. On
> > wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
> > UserScale I set. However, if I draw rotated text with a non-zero
> > rotation, the text scales correctly. This problem is not apparent on
> > wxMSW.
> >
> > Am I missing something, or is this a real wxGTK problem. (I appreciate
> > there are no TT-fonts in GTK, but the wx-documents indicate I should see
> > at least approximate scaling of font-sizes using SetUserScale. I don't
> > see any!). Anyone out there got a suggestion for an elegant workaround.
> >
>
> In my case I have wxMemoryDC on which I'm actually doing drawing, and then
> in OnPaint event handler I wxDC.Blit() from this memory DC to the wxPaintDC,
> which I create in this event handler (I guess you are doing something like that
> too)
> And if I call SetUserScale() on wxPaintDC AFTER Blit() than there is no scaling
> at all (this is obvious ) But if I call it BEFORE Blit Than all figures and
> FONTs are scaled properly. (There are another problem in my case -- odd stuff
> appears on the screen except figures But all fonts are scaled fine!)
>
> --
> -----------------------------------------------------------------
> ICQ#73297983 Your sincerely, Maxx.
> mailto:maxxua@pisem.net
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net
Thanks for help
I look forward to hearing from you soon.
Best regards,
Ladislav Blazek( Mr.)
BMA TRADING Ltd.
email: export@sendme.cz
email2: export@bmatrading.com
Fax:/Tel +420 506 447921
Tel:+420 506 447920, +420 602 849309
···
On 1 Jul 2002, at 9:22, Jeff Sasmor wrote:
Maybe he means writing as well: you cannot write GIFs, just
read them. I am sure that this is due to licensing issues regarding
the compression algo used in GIFs. #--------------------------------
Jeff Sasmor jeff@sasmor.com ----- Original Message ----- From: "Maxim
Slojko" <maxx@pearl.dgap.mipt.ru> To:
<wxpython-users@lists.wxwindows.org> Sent: Monday, July 01, 2002 6:26
AM Subject: Re: [wxPython] Is GIF format supportedOn Mon, 1 Jul 2002, A wrote:
> Hi,
> Does anyone know if GIF format of pictures is supported in
> wxpython?
> Thanks for reply
> LadislavI don't know what you mean "supported", but this works very good:
wxImage("mydir/myimage.gif",BITMAP_TYPE_GIF) If you need it to be
bitmap (wxBitmap) somewhere you can just call
wxImage.ConvertToBitmap()--
Thanks for help.
ladislav
···
On 1 Jul 2002, at 14:26, Maxim Slojko wrote:
On Mon, 1 Jul 2002, A wrote:
> Hi,
> Does anyone know if GIF format of pictures is supported in
> wxpython?
> Thanks for reply
> LadislavI don't know what you mean "supported", but this works very good:
wxImage("mydir/myimage.gif",BITMAP_TYPE_GIF) If you need it to be
bitmap (wxBitmap) somewhere you can just call
wxImage.ConvertToBitmap()--
-----------------------------------------------------------------
ICQ#73297983 Your sincerely, Maxx.
mailto:maxxua@pisem.net_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
I have a application which draws stuff, including text, to a DC (a
wxPanel). I'm using the dc::SetUserScale function to do zooming. On
wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
UserScale I set. However, if I draw rotated text with a non-zero
rotation, the text scales correctly. This problem is not apparent on
wxMSW.
It looks to my like the text is being scaled, but that rotated text is
scaling too much. IOW when the scale factor is < 1.0 then the rotated text
is too small, and when it is > 1.0 then it is too big.
Please enter a bug report about this.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
I see what you describe when I create my own wxFont. Previously I was
using the default wxNORMAL_FONT, for which the ratated text was scaling
OK, but the normal text was scaled too little (if at all).
Bryan
···
On Tue, 2002-07-02 at 18:46, Robin Dunn wrote:
> I have a application which draws stuff, including text, to a DC (a
> wxPanel). I'm using the dc::SetUserScale function to do zooming. On
> wxGTK 2.3.2.1, the text font-size appears unaffected by whatever
> UserScale I set. However, if I draw rotated text with a non-zero
> rotation, the text scales correctly. This problem is not apparent on
> wxMSW.It looks to my like the text is being scaled, but that rotated text is
scaling too much. IOW when the scale factor is < 1.0 then the rotated text
is too small, and when it is > 1.0 then it is too big.Please enter a bug report about this.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
Bryan Cole
Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge
CB4 0WG, United Kingdom.
tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382
Hai I've got message alert:
"No image handler for type 17 defined"
for the argument below:
self.staticBitmap1 = wxStaticBitmap(bitmap =
wxBitmap('C:/Documents and Settings/Administrator/My
Documents/python/python_doc/tut-intro_files/wxPython.jpg',
wxBITMAP_TYPE_JPEG), id =
wxID_MEDICALRECORDSTATICBITMAP1, name =
'staticBitmap1', parent = self.panel1, pos =
wxPoint(16, 16), size = wxSize(144, 64), style = 0)
What should I do?
Thanx
M. Danu F.
···
__________________________________________________
Do You Yahoo!?
Yahoo! Tech - Get in touch with the latest in technology.
http://sg.tech.yahoo.com
wxInitAllImageHandlers() (hope I got the name right from memory) in your wxApp()'s OnInit (make it the first thing you do). This loads up every image handler available in the build of wxPython/wxWindows. Without that, you only have a few simple handlers, which makes it difficult to read complex optional formats like jpeg or png.
HTH,
Mike
danu kusmana wrote:
···
Hai I've got message alert:
"No image handler for type 17 defined"
for the argument below:
self.staticBitmap1 = wxStaticBitmap(bitmap =
wxBitmap('C:/Documents and Settings/Administrator/My
Documents/python/python_doc/tut-intro_files/wxPython.jpg',
wxBITMAP_TYPE_JPEG), id =
wxID_MEDICALRECORDSTATICBITMAP1, name =
'staticBitmap1', parent = self.panel1, pos =
wxPoint(16, 16), size = wxSize(144, 64), style = 0)What should I do?
Thanx
M. Danu F.
__________________________________________________
Do You Yahoo!?
Yahoo! Tech - Get in touch with the latest in technology.
http://sg.tech.yahoo.com_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
_______________________________________
Mike C. Fletcher
http://members.rogers.com/mcfletch/