ZhangZhihui's Blog |
|
||
2023年10月16日
摘要:
Problem: You want to create a TCP client to send data to a TCP server. Solution: Use the Dial function in the net package to connect to a TCP server. 阅读全文
摘要:
Problem: You want to create a TCP server to receive data from a TCP client. Solution: Use the Listen function in the net package to listen for connect 阅读全文
摘要:
Computer networks use network protocols to communicate with each other. Network protocols are often abstracted into different layers. For example, Ope 阅读全文
2023年10月10日
摘要:
Problem: You want to resize an image, making it larger or smaller. Solution: Convert an image to a grid of pixels as the source and create a new image 阅读全文
摘要:
Problem: You want to convert the image to grayscale. Solution: Convert an image to a grid of pixels. Take each pixel in the grid and convert it to a g 阅读全文
摘要:
Problem: You want to flip an image upside down. Solution: Convert an image to a grid of pixels. Swap the positions of the top and bottom pairs of pixe 阅读全文
摘要:
Problem: You want to create an image from scratch. Solution: Create one of the Image implementation structs (e.g., NRGBA ) and populate it with the ap 阅读全文
摘要:
Problem: You have an image and want to save it to a file. Solution: Use the Encode method of the correct file format package (e.g., png.Encode for PNG 阅读全文
摘要:
Problem: You want to load an image from an image file. Solution: Use image.Decode to decode data from an image file into an implementation of image.Im 阅读全文
摘要:
The standard library for 2D image manipulation is the image package and the main interface is image.Image . To work with the different image formats, 阅读全文
|
Copyright © 2024 ZhangZhihuiAAA
Powered by .NET 9.0 on Kubernetes |