M
M
mamenxacker2016-12-05 13:46:29
go
mamenxacker, 2016-12-05 13:46:29

How to create an image and change the color of a specific pixel using Golang?

Hello,
I need:
1.1. Create an image of a certain size (eg 32x32 px).
1.2. Change the color of a certain pixel/s (for example (X=2;Y=3), and the color is rgba(255, 255, 255, 0)).
1.3. Save this file (image).
2.1. "Read" from a file (created using the method described above) an array of pixel colors.
Is it possible to implement a similar "algorithm" using Golang? If so, how?
Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pavlyuk, 2016-12-05
@pav5000

An example of working with the standard image package
https://golang.org/pkg/image/#example_

M
Max Voronov, 2016-12-08
@RavenRage

I think these examples can help you:
https://github.com/anthonynsimon/bild
This is a selection of algorithms for working with images. You just need to choose the most suitable for the task and understand how it works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question