| I am a Cpp beginner (70) | |||
Hi everyone, I am currently working on a paint program and I am having trouble getting it to save images. Any images that it saves ends up blank. Can someone please help me. Here's the code for my save image function:
Please help!!! | |||
|
|
|||
| coder777 (2550) | |
What type is Image? Neither wxImage nor wxBitmap has according to the current documentation a function named SetSize()wxImage has a function Size which returns a copy of the image with the new size (what probably happens in your case). Use Resize in order to change the size of an image in place.See http://docs.wxwidgets.org/stable/wx_wximage.html#wximage http://docs.wxwidgets.org/stable/wx_wximage.html#wximageresize http://docs.wxwidgets.org/stable/wx_wximage.html#wximagesize | |
|
|
|
| I am a Cpp beginner (70) | |
|
Image is a wxBitmap, I have worked out the problem but I have no idea about how to solve it. i think the problem is that when I draw on Memory, it does not apply the changes to Image. Please help!!! | |
|
|
|
| coder777 (2550) | |
Use the latest version of wxwidget. I don't know what SetSize() does.how is Image created?http://docs.wxwidgets.org/stable/wx_wxbitmap.html#wxbitmapcreate I'd expect that Image is a local varibale within OnSaveImage(). I'd expect that for Memory too which is a wxMemoryDC? | |
|
|
|