From 7f866b2b1fd6ff92e678d8cde1e97772100bfca7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Jan 2023 13:08:57 +0530 Subject: [PATCH] Start work on rendering images with Go --- tools/cmd/icat/native.go | 12 ++++++++++++ tools/cmd/icat/process_images.go | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 tools/cmd/icat/native.go diff --git a/tools/cmd/icat/native.go b/tools/cmd/icat/native.go new file mode 100644 index 000000000..e72b3e0af --- /dev/null +++ b/tools/cmd/icat/native.go @@ -0,0 +1,12 @@ +// License: GPLv3 Copyright: 2023, Kovid Goyal, + +package icat + +import ( + "fmt" +) + +var _ = fmt.Print + +func render_image_with_go(imgd *image_data, src *opened_input) { +} diff --git a/tools/cmd/icat/process_images.go b/tools/cmd/icat/process_images.go index 483ed2394..14a4b20fd 100644 --- a/tools/cmd/icat/process_images.go +++ b/tools/cmd/icat/process_images.go @@ -251,6 +251,12 @@ func process_arg(arg input_arg) { send_output(&imgd) return } + err = render_image_with_go(imgd, &f) + if err != nil { + report_error(arg.value, "Could not render image to RGB", err) + return + } + send_output(&imgd) }