title: How to save image with wxImage?
body: <p>I have raw data of an image captured from my phone, it's resolution is 480*800, format is RGBA. Then I want to save it into a jpeg image with wxImage function. The cod is listed below:</p>
  
  <pre><code>wxFile m_bufferfile = wxFile(wxT("out.raw"));
  if(!m_bufferfile-&gt;IsOpened())
  {
      wxLogMessage( _T("Fail to open the config file.") );
  }
  m_count = m_bufferfile-&gt;Length();
  unsigned char* rawdata = new unsigned char[m_count];
  for(unsigned int i = 0; i &lt; m_count; i=i+4)
  {
      m_bufferfile-&gt;Seek(1,wxFromCurrent);
  m_bufferfile-&gt;Read(rawdata, 3);
  }
  wxImage *image = new wxImage(480, 800, rawdata, false);
  image-&gt;SaveFile(wxT("raw.jpg"),wxBITMAP_TYPE_JPEG);
  </code></pre>
  
  <p>When I opened the raw.jpg, it turns out black.
  Is there wrong?</p>