imaging icon indicating copy to clipboard operation
imaging copied to clipboard

can you put more example

Open sadegh-shahbazi opened this issue 6 years ago • 3 comments

It's hard to use this package I just find this tutorial https://socketloop.com/tutorials/golang-resize-image

can you put more examples???plz

and what is this error:

cannot find package "golang.org/x/image/bmp" in any of:
	C:\Go\src\golang.org\x\image\bmp (from $GOROOT)
	C:\Go\myProjects\projectname\src\golang.org\x\image\bmp (from $GOPATH)

sadegh-shahbazi avatar Apr 17 '19 17:04 sadegh-shahbazi

I agree. It would be helpfull if there were more usage examples in the documentation. I will look into it.

As for the error message, the "golang.org/x/image/bmp" package is not found in your package search path. To fix that, run the go get command to download the imaging package and its dependencies:

go get github.com/disintegration/imaging

Alternatively you can go get the "golang.org/x/image/bmp" directly:

go get golang.org/x/image/bmp

disintegration avatar Apr 23 '19 09:04 disintegration

Okay, so here are a few ideas to put in a future "/examples" folder:

  • Opening a png image, bluring it and saving it back to disk with default settings (introductory example)
  • Opening a png image and saving it as jpg (with custom compression settings)
  • Creating a split screen comparison between two images
  • Creating and saving a histogram (I have seen that this package has tools for that, but I haven't used them myself)
  • The example from the readme file

struffel avatar Dec 18 '20 21:12 struffel

One more example to add (because I don't find the right way) is to make a drop shadow based on alpha. The idea is to get the alpha, dilate it, blur, apply it under the original image. If someone has got the right method...

metal3d avatar Apr 26 '21 07:04 metal3d