<div>참고로 파이썬 버전은 3.5입니다. </div> <div><br></div>import wx <div><br></div> <div>class MyFrame(wx.Frame):</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>def __init__(self):</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>wx.Frame.__init__(self, parent=None, title = 'test')</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>self.SetSize(500,500)</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>self.mainPanel = wx.Panel(self)</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span></div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>self.staticBitmap = wx.StaticBitmap(self.mainPanel)</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>with open('test.jpg','rb') as file:</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>img = file.read()</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>self.staticBitmap.SetBitmap(wx.Bitmap(img)) <span class="Apple-tab-span" style="white-space:pre;"> </span># 이부분에서 bytes형식인 img를 Bitmap형식으로 바꿔야</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span># 하는데 어떻게 하면 되나요.. ㅠㅠ </div> <div><br></div> <div>if __name__=="__main__":</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>app = wx.App()</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>frame = MyFrame()</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>frame.Show()</div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>app.MainLoop()</div> <div><br></div> <div>이런식으로 해서 Byte형식을 Bitmap으로 바꾸고 싶은데 어떻게 하는지 못찾겠네요 ㅠ ㅠ</div> <div>wx.image(filepath)를 써서 파일을 여는 방법이 있지만 </div> <div>제가 하려는거는 db파일에 저장된 데이터를 비트맵으로 바꾸고 싶습니다.. </div> <div>며칠째 이것만 고민하느라 진도를 못나가고 있습니다 ㅠㅠ 풀릴때 까지 하려고여.. </div> <div><br></div>
<img src="http://cfile28.uf.tistory.com/image/155E0A44502B0F911A8F1F" width="300" height="300" alt="155E0A44502B0F911A8F1F"><img_ src="http://cfile2.uf.tistory.com/image/2032CE3F502B0F8C16B99F" width="300" height="300" alt="2032CE3F502B0F8C16B99F"><img_ src="http://cfile23.uf.tistory.com/image/173DA83F502B0F8F08BB8A" width="300" height="300" alt="173DA83F502B0F8F08BB8A"><img_ src="http://cfile8.uf.tistory.com/image/1841543F502B0F8F035627" width="300" height="300" alt="1841543F502B0F8F035627"><img_ src="http://cfile25.uf.tistory.com/image/1570F146502B0F8A13037E" width="300" height="300" alt="1570F146502B0F8A13037E"><img_ src="http://cfile23.uf.tistory.com/image/1432BB3F502B0F8B15176F" width="300" height="300" alt="1432BB3F502B0F8B15176F"><img_ src="http://cfile23.uf.tistory.com/image/1231DB4C502B0F45116E4B" width="300" height="300" alt="1231DB4C502B0F45116E4B"><img_ src="http://cfile1.uf.tistory.com/image/1434074C502B0F810F0E19" width="300" height="300" alt="1434074C502B0F810F0E19"><img_ src="http://cfile25.uf.tistory.com/image/1316224C502B0F5F3389B9" width="300" height="300" alt="1316224C502B0F5F3389B9"><img_ src="http://cfile30.uf.tistory.com/image/1213EE4C502B0F46349B55" width="300" height="300" alt="1213EE4C502B0F46349B55"><img_ src="http://cfile24.uf.tistory.com/image/15374E4C502B0F4B0C7039" width="300" height="300" alt="15374E4C502B0F4B0C7039"><img_ src="http://cfile29.uf.tistory.com/image/12140B4C502B0F8336DFA2" width="300" height="300" alt="12140B4C502B0F8336DFA2"><img_ src="http://cfile25.uf.tistory.com/image/1631DB4C502B0F8412F340" width="300" height="300" alt="1631DB4C502B0F8412F340"><img_ src="http://cfile8.uf.tistory.com/image/1134474C502B0F840FC748" width="300" height="300" alt="1134474C502B0F840FC748"><img_ src="http://cfile8.uf.tistory.com/image/17644444502B0F85117654" width="300" height="300" alt="17644444502B0F85117654"><img_ src="http://cfile21.uf.tistory.com/image/12686644502B0F8509916F" width="300" height="300" alt="12686644502B0F8509916F"><img_ src="http://cfile10.uf.tistory.com/image/1566A144502B0F850B43C3" width="300" height="300" alt="1566A144502B0F850B43C3"><img_ src="http://cfile5.uf.tistory.com/image/1968A344502B0F8607284B" width="300" height="300" alt="1968A344502B0F8607284B"><img_ src="http://cfile21.uf.tistory.com/image/126A5D44502B0F86069A51" width="300" height="300" alt="126A5D44502B0F86069A51"><img_ src="http://cfile25.uf.tistory.com/image/1165C244502B0F870DB3BB" width="300" height="300" alt="1165C244502B0F870DB3BB"><img_ src="http://cfile10.uf.tistory.com/image/14666844502B0F870CB33C" width="300" height="300" alt="14666844502B0F870CB33C"><img_ src="http://cfile1.uf.tistory.com/image/12570946502B0F8836CF3C" width="300" height="300" alt="12570946502B0F8836CF3C"><img_ src="http://cfile10.uf.tistory.com/image/1175AE46502B0F880C071F" width="300" height="300" alt="1175AE46502B0F880C071F"><img_ src="http://cfile23.uf.tistory.com/image/17765A46502B0F890CB527" width="300" height="300" alt="17765A46502B0F890CB527"><img_ src="http://cfile1.uf.tistory.com/image/19535F46502B0F893BE5CC" width="300" height="300" alt="19535F46502B0F893BE5CC"><img_ src="http://cfile7.uf.tistory.com/image/1379CD46502B0F8A0719EA" width="300" height="300" alt="1379CD46502B0F8A0719EA"><img_ src="http://cfile23.uf.tistory.com/image/164D4D44502B0F912F8066" width="300" height="300" alt="164D4D44502B0F912F8066"><img_ src="http://cfile25.uf.tistory.com/image/123B593F502B0F8C0CE57B" width="300" height="300" alt="123B593F502B0F8C0CE57B"><img_ src="http://cfile2.uf.tistory.com/image/181A913F502B0F913690FB" width="300" height="300" alt="181A913F502B0F913690FB"><img_ src="http://cfile7.uf.tistory.com/image/153A2F3F502B0F900E8CA3" width="300" height="300" alt="153A2F3F502B0F900E8CA3"><img_ src="http://cfile9.uf.tistory.com/image/1933143F502B0F8F16ACF6" width="300" height="300" alt="1933143F502B0F8F16ACF6"><img_ src="http://thimg.todayhumor.co.kr/upfile/201112/1325124147104_1.gif" alt="1325124147104_1.gif"><img_ src="http://cfile1.uf.tistory.com/image/182B02424F24A1F10B1AE1" alt="182B02424F24A1F10B1AE1"><img_ src="http://img.joycity.com/upload/bbs/05/98/92/1326786860383999721.gif" alt="1326786860383999721.gif"><img_ src="http://thimg.todayhumor.co.kr/upfile/201205/1338093031109_1.jpg" alt="1338093031109_1.jpg"><img_ src="http://thimg.todayhumor.co.kr/upfile/201202/1329285783649_1.jpg" alt="1329285783649_1.jpg"><img_ src="http://thimg.todayhumor.co.kr/upfile/201112/1325124147104_1.gif" alt="1325124147104_1.gif"><img_ src="http://thimg.todayhumor.co.kr/upfile/201112/1325121619104_2.gif" alt="1325121619104_2.gif"><img_ src="http://thimg.todayhumor.co.kr/upfile/201112/1325121619104_3.gif" alt="1325121619104_3.gif">