So as the headline suggests, I am looking for an algorithm/algorithms used for square-to-hex and hex-to-square pixel coordinates convertion.
I have an image which looks kinda "interpolated", meaning some pixels are of one colour, while some have a slightly different shade etc. So pixel colour kinda stores offset or whatever. If you're interested, it's here
It has to do with pathfinding, the logical part of map is made of hexmap while the visual part of map is made of squares. Here, size of the square = 1 pixel, same hex size is equal to 1 pixel.
So basically I will be trying to convert an image with hex pixel coords to image with square pixel coords and vise versa.
I'm sorry if this was answered already somewhere, I couldn't find it anywhere.
P.S. I reverse engineered the image, so in binary it was only X and Y coords stored plus a third byte value which I took as a greyscale colour (later compared with another image and it matched)