imaging
imaging copied to clipboard
how can we resize image
Hi buddy , My Code is :
src2,_:=imaging.Open("./screen.png") //screen.png is px is 160*60 imaging.Resize(src2,320,120,imaging.Lanczos)
err = imaging.Save(src2,"./example02.png")
it can`t work , example02.png also is 160*60
how can i resize the bigger image ?
Hi,
The Resize
function returns the new (resized) image. Try changing the second line this way:
src2 = imaging.Resize(src2, 320, 120, imaging.Lanczos)
It`s okay , thanks buddy !
Hi @disintegration , I have used imaging for sometimes, and faced an issue when resizing images.
It's corrupted, resulting image in grey blocks as following attachment. Can you please tell me what is the root cause? Thanks a lot.