bright-gpu-74537
03/16/2022, 11:19 AMhaxe
@:bind(buttonOpen, MouseEvent.CLICK)
private function onClickOpen(e:MouseEvent) {
var options:SelectFileDialogOptions = {
readContents: true,
readAsBinary: true,
multiple: false
};
Dialogs.selectFile((btn, files) -> {
if (btn == DialogButton.OK) {
var fileinfo = files.pop();
var png = new format.png.Reader(new haxe.io.BytesInput(fileinfo.bytes)).read();
var header = format.png.Tools.getHeader(png);
var bgra = format.png.Tools.extract32(png);
image1.resource = createImageData(header.width, header.height, bgra);
}
}, options);
}bulky-exabyte-6537
03/16/2022, 3:30 PMbulky-exabyte-6537
03/16/2022, 3:31 PMbulky-exabyte-6537
03/16/2022, 3:33 PMbright-gpu-74537
03/16/2022, 3:33 PMbright-gpu-74537
03/16/2022, 3:33 PMbright-gpu-74537
03/16/2022, 3:36 PMbulky-exabyte-6537
03/16/2022, 3:38 PMbest-agent-85158
03/16/2022, 5:43 PMbest-agent-85158
03/16/2022, 5:45 PMbest-agent-85158
03/16/2022, 5:49 PMbest-agent-85158
03/16/2022, 5:49 PMquiet-chef-75453
03/16/2022, 5:52 PMquiet-chef-75453
03/16/2022, 5:52 PMelegant-twilight-61392
03/16/2022, 5:53 PMelegant-twilight-61392
03/16/2022, 5:53 PMquiet-chef-75453
03/16/2022, 5:54 PMquiet-chef-75453
03/16/2022, 5:54 PMelegant-twilight-61392
03/16/2022, 5:54 PMelegant-twilight-61392
03/16/2022, 5:55 PMbest-agent-85158
03/16/2022, 6:16 PMbulky-exabyte-6537
03/17/2022, 12:46 AMbulky-exabyte-6537
03/17/2022, 12:49 AMbulky-exabyte-6537
03/17/2022, 12:54 AMbest-agent-85158
03/17/2022, 6:26 AMbulky-exabyte-6537
03/17/2022, 7:53 AMbulky-exabyte-6537
03/17/2022, 7:56 AMbest-agent-85158
03/17/2022, 8:00 AMbright-gpu-74537
03/17/2022, 8:04 AMbest-agent-85158
03/17/2022, 1:53 PM