liufuqiang / graphics-go Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/graphics-go
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/graphics-go
License: BSD 3-Clause "New" or "Revised" License
It seems that this entire package uses *inverse* transformations from the usual
convention.
This is borne out by examination of the Transform functions, which transform
from the destination to the source to look up pixels.
In addition, each of the Rotate, Translate, etc. functions generates an inverse
matrix (for example, Translate puts -x and -y in the translation terms;
Rotation produces at clockwise rotation by documentation, while the matrix it
provides usually produces a ccw rotation).
If this is intentional it needs to be clearly documented - providing your own
affine transform doesn't work as expected - you have to invert it first.
To fix this we'd need to add an Invert() function and call it before the
transformations. I'm happy to provide a patch if this is the correct route.
Original issue reported on code.google.com by [email protected]
on 12 Jan 2012 at 7:13
What steps will reproduce the problem?
1. Compile the following program
package main
import "image"
import "graphics-go.googlecode.com/hg/graphics"
func main() {
src := image.NewGray(image.Rect(50,50,60,60))
dst := image.NewGray(image.Rect(0,0,100,100))
graphics.I.Transform(dst, src)
}
2. Run it.
What is the expected output? What do you see instead?
Absolutely nothing. Instead I get:
panic: runtime error: index out of range
goroutine 1 [running]:
graphics-go%2egooglecode%2ecom/hg/graphics.binterpRGBA(0xf84001c870,
0x3200000032, 0xf84001c570, 0x4049400000000000, 0x4049400000000000, ...)
/Users/gunca/Code/go/src/pkg/graphics-go.googlecode.com/hg/graphics/bilinear.go:104 +0x5e4
graphics-go%2egooglecode%2ecom/hg/graphics.Affine.Transform(0x3ff0000000000000,
0x0, 0x0, 0x0, 0x3ff0000000000000, ...)
/Users/gunca/Code/go/src/pkg/graphics-go.googlecode.com/hg/graphics/affine.go:66 +0x348
main.main()
/Users/gunca/Code/go-rotate/rotate.go:10 +0x144
What version of the product are you using? On what operating system?
hg identify -> d7322ae4d055+ weekly/weekly.2011-09-21
latest graphics-go on Snow Leopard
Original issue reported on code.google.com by Gunchars
on 12 Nov 2011 at 1:48
Applying a convolution on an image obtained via a call to img.SubImage(rect)
leads to a index out range error.
What steps will reproduce the problem?
go run main.go (attached)
What is the expected output? What do you see instead?
We do not expect an exception to be raised.
What version of the product are you using? On what operating system?
- go version: 1.2.2-1
- latest version of graphics-co
- up-to-date Archlinux
Original issue reported on code.google.com by [email protected]
on 22 May 2014 at 11:10
Attachments:
The home page of the project has the command to install as:
2. goinstall code.google.com/p/graphics-go/graphics
Should now be:
2. go get code.google.com/p/graphics-go/graphics
Original issue reported on code.google.com by [email protected]
on 28 Jul 2012 at 10:08
See
http://code.google.com/r/cbro-graphics-go/source/detail?r=ee82808bb1de44bcd6ef0d
0770f92d15f1f1ecba
Original issue reported on code.google.com by [email protected]
on 2 Feb 2012 at 3:01
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.