esimov/caire

Processing... /panic: runtime error: index out of range

balupton opened this issue · 1 comments

14:21:32:/Users/balupton/Dropbox/Ben, Helen/Artwork Exports/Exports:master
> caire -in 3x -out 1024h -height=1024 -scale=true
Processing... /panic: runtime error: index out of range

goroutine 1 [running]:
github.com/esimov/caire.(*Carver).get(...)
	/Users/esimov/Go/src/github.com/esimov/caire/carver.go:62
github.com/esimov/caire.(*Carver).ComputeSeams(0xc4200765a0, 0xc420053800, 0xc420052400, 0xc4231ee000, 0x400, 0x400)
	/Users/esimov/Go/src/github.com/esimov/caire/carver.go:201 +0xfa2
github.com/esimov/caire.(*Processor).Resize.func1()
	/Users/esimov/Go/src/github.com/esimov/caire/process.go:74 +0x116
github.com/esimov/caire.(*Processor).Resize(0xc420052400, 0xc420053800, 0x0, 0xc4200520c0, 0xffffffffffffffff, 0xc42138e000)
	/Users/esimov/Go/src/github.com/esimov/caire/process.go:147 +0x8f6
github.com/esimov/caire.Resize(0x11db2a0, 0xc420052400, 0xc4200520c0, 0xc420052480, 0x113b93a, 0x3, 0x0)
	/Users/esimov/Go/src/github.com/esimov/caire/process.go:41 +0x3b
github.com/esimov/caire.(*Processor).Process(0xc420052400, 0x11db4a0, 0xc42000c090, 0x11db4e0, 0xc42000c098, 0x0, 0x0)
	/Users/esimov/Go/src/github.com/esimov/caire/process.go:177 +0x7e
main.main()
	/Users/esimov/Go/src/github.com/esimov/caire/cmd/caire/main.go:143 +0x5c5
[2]:14:28:12:/Users/balupton/Dropbox/Ben, Helen/Artwork Exports/Exports:master
> 
> caire --version
flag provided but not defined: -version

┌─┐┌─┐┬┬─┐┌─┐
│  ├─┤│├┬┘├┤
└─┘┴ ┴┴┴└─└─┘

Content aware image resize library.
    Version: 1.1.0

  -blur int
    	Blur radius (default 1)
  -cc string
    	Cascade classifier
  -debug
    	Use debugger
  -face
    	Use face detection
  -height int
    	New height
  -in string
    	Source
  -out string
    	Destination
  -perc
    	Reduce image by percentage
  -scale
    	Proportional scaling
  -sobel int
    	Sobel filter threshold (default 10)
  -square
    	Reduce image to square dimensions
  -width int
    	New width
> uname -a
Darwin balbook-2018.local 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64

@balupton the usage of scale option is restricted to image reduction and not for image enlargement. This has been fixed now and a new release has been deployed. Thanks for notifying me about this issue.