Start work on rendering with ImageMagick

This commit is contained in:
Kovid Goyal 2023-01-03 11:02:56 +05:30
parent 7ebb281855
commit fd71d2035d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 19 additions and 3 deletions

13
tools/cmd/icat/magick.go Normal file
View File

@ -0,0 +1,13 @@
// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
package icat
import (
"fmt"
)
var _ = fmt.Print
func render_image_with_magick(imgd *image_data, src *opened_input) error {
return nil
}

View File

@ -253,11 +253,14 @@ func process_arg(arg input_arg) {
c, format, err := image.DecodeConfig(f.file)
f.Rewind()
imgd := image_data{source_name: arg.value}
if err != nil {
report_error(arg.value, "Unknown image format", err)
if !keep_going.Load() {
return
}
if !keep_going.Load() {
if err != nil {
err = render_image_with_magick(&imgd, &f)
if err != nil {
report_error(arg.value, "ImageMagick failed", err)
}
return
}
imgd.canvas_width = c.Width