|
@@ -15,16 +15,13 @@ public:
|
15
|
15
|
void OnInitialize(void) override
|
16
|
16
|
{
|
17
|
17
|
DKLogD("%s", DKGL_FUNCTION_NAME);
|
18
|
|
- window = DKWindow::Create("DefaultWindow");
|
19
|
|
- window->Activate();
|
20
|
18
|
|
21
|
|
- window->AddEventHandler(this,
|
22
|
|
- DKFunction([this](const DKWindow::WindowEvent& e) {
|
23
|
|
- if (e.type == DKWindow::WindowEvent::WindowClosed)
|
24
|
|
- DKApplication::Instance()->Terminate(0);
|
25
|
|
- }),
|
26
|
|
- NULL, NULL);
|
|
19
|
+ DKImage image;
|
|
20
|
+ image.LoadFromFile("C:\\Users\\hong\\Desktop\\test\\1.png");
|
|
21
|
+ DKObject<DKData> data = image.EncodeData("png");
|
|
22
|
+ data->WriteToFile("C:\\Users\\hong\\Desktop\\test\\2.png", true);
|
27
|
23
|
|
|
24
|
+ Terminate(0);
|
28
|
25
|
}
|
29
|
26
|
void OnTerminate(void) override
|
30
|
27
|
{
|