Discussion:
wxImage and SaveFile
Ralph Pass
2014-05-06 13:13:02 UTC
Permalink
I am looking at the following code:

wxImage image;
image.SaveFile("test", 1);


When I try to compile I am told that SaveFile is Deprecated.

I have searched the web and there is no obvious explanation. Looking at the documentation, SaveFile is still provided without any indication of Deprecation.

Am I missing something? if so, what?


Thanks,
Ralph Pass
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
David Connet
2014-05-06 13:34:15 UTC
Permalink
Post by Ralph Pass
wxImage image;
image.SaveFile("test", 1);
When I try to compile I am told that SaveFile is Deprecated.
I have searched the web and there is no obvious explanation. Looking at the documentation, SaveFile is still provided without any indication of Deprecation.
Am I missing something? if so, what?
Just a guess, but maybe because you're using a value of '1' (int)
instead of the wxBitmapType enum?

Dave
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Ralph Pass
2014-05-06 13:57:34 UTC
Permalink
The answer was it needs to be a wxBITMAP_TYPE not an integer. My local documentation and several of the ones I found on line still said int was allowed.

Thanks and sorry for the noise

Ralph Pass
Post by Ralph Pass
wxImage image;
image.SaveFile("test", 1);
When I try to compile I am told that SaveFile is Deprecated.
I have searched the web and there is no obvious explanation. Looking at the documentation, SaveFile is still provided without any indication of Deprecation.
Am I missing something? if so, what?
Just a guess, but maybe because you're using a value of '1' (int) instead of the wxBitmapType enum?
Dave
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Eric Jensen
2014-05-06 13:32:04 UTC
Permalink
Hello Ralph,

Tuesday, May 6, 2014, 3:13:02 PM, you wrote:

RP> I am looking at the following code:

RP> wxImage image;
RP> image.SaveFile("test", 1);


RP> When I try to compile I am told that SaveFile is Deprecated.

RP> I have searched the web and there is no obvious explanation.
RP> Looking at the documentation, SaveFile is still provided without
RP> any indication of Deprecation.

RP> Am I missing something? if so, what?

The second parameter is not an integer any more, it has its own type:
wxBitmapType

Eric
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...