Start work on rendering with ImageMagick
This commit is contained in:
parent
7ebb281855
commit
fd71d2035d
13
tools/cmd/icat/magick.go
Normal file
13
tools/cmd/icat/magick.go
Normal 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
|
||||
}
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user