I want to add numbered rows and columns to a color chart I produced using pixelmath in Pixinsight. But PI seems to lack facilities for automatic labeling, so I brought the chart into Mathematica as a bitmap, thinking I could superimpose text onto the bitmap in precise locations. The local documentation suggested I might be able to do this with ImageCompose[], which worked up to a point. I find that I am unable to position labels exactly where I want them. The bitmap and the graphics seem to lack common mapping. I need suggestions.
The yellow disc at the bottom center is located at the origin point. The rows of numbers are in the expected row and column, but not in their precise desired positions.
Postscript: After several comments, I have revised a bit. The user will have to add their own path or paste in the attached bitmap. To see the effect of Schachner's revision, uncomment the three rules in the Graphics[] function near the bottom.
(* BITMAP *)
path = "/Users/<username>/Documents/ASTRONOMY/JWST/COLORS/";
colorFile = StringJoin[path, "rb10.bmp"];
bitmap = Import[colorFile];
(*GLOBALS*)
(*grid parameters*)
iDims = ImageDimensions@bitmap;
imgWd = iDims[[
1]];(*width and height of this image*)
n = 10.0;(*number rows or \
columns*)
wd = imgWd/n;(*width of row or column*)
rowStart =
imgWd - wd/2.0;
colStart = -imgWd/2.0 + wd/2.0;
(*text values*)
txtSz = 16; color = Yellow; face = Bold;
(*OBJECTS*)
rowTxt =
Table[Text[
Style[ToString[m + 1], {txtSz, color, face}], {colStart + m*wd,
rowStart}], {m, Range[0, n - 1]}];
colTxt =
Table[Text[
Style[ToString[m + 1], {txtSz, color, face}], {colStart,
rowStart - m*wd}], {m, Range[0, n - 1]}];
originPt = {Yellow, PointSize[.03],
Point[{0, 0}]};
gr = Graphics[{rowTxt, colTxt, originPt},
(* three lines added by Henrik Schachner: *)
(*
PlotRangePadding->None,
PlotRange->{{-imgWd/2.0,imgWd/2.0},{1,imgWd}},
ImageSize->iDims *)
];
ImageCompose[bitmap, gr]

Attachments: