Documentation ¶
Index ¶
- type MyImage
- func (i *MyImage) Congregate(maxMoveDist int, numIters float64)
- func (i *MyImage) GetColorWithLinearInterpolation(x float64, y float64) *mycolor.MyColor
- func (i *MyImage) SaveAs(path string)
- func (i *MyImage) ShowThumb(thumbSize float64)
- func (i *MyImage) SortColumns(kind string, numThreads int)
- func (i *MyImage) SortRows(kind string, numThreads int)
- func (i *MyImage) String() string
- func (i *MyImage) ThumbnailByPixels(maxRes int) *MyImage
- func (i *MyImage) ThumbnailByRatio(ratio float64) *MyImage
- func (i *MyImage) ToBuiltInImage() image.Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyImage ¶
type MyImage struct {
// contains filtered or unexported fields
}
func MakeMyImageFromPath ¶
Given a path to an image file on disk, return a MyImage struct.
func (*MyImage) Congregate ¶
Modify the image in-place by swapping pixels to places where they match their neighbors. maxMoveDist is the max distance between two swapped pixels. If 0, there is no limit.
func (*MyImage) GetColorWithLinearInterpolation ¶
Return an interpolated pixel value from the image. x and y values outside the image will return the value from the nearest point in the image.
func (*MyImage) SortColumns ¶
Launch some threads to sort the rows of the image. Wait until complete, and kill the threads.
func (*MyImage) SortRows ¶
Launch some threads to sort the rows of the image. Wait until complete, and kill the threads.
func (*MyImage) ThumbnailByPixels ¶
Return a new image which fits in a square of maxRes x maxRes pixels but keeps the same aspect ratio. If the image is already small enough, just return the same image again.
func (*MyImage) ThumbnailByRatio ¶
Return a new image which has a size of (ratio * original_image_size)
func (*MyImage) ToBuiltInImage ¶
Create an image using the built-in image.RGBA type and copy our pixels into it.