Looking at them with a hex editor, one of the images has an obvious
lookup table for the colours. The other does not. The other one
has the four character string "gAMA" as if a gamma curve is being used.
These are structured ahead of an IDAT section. I only examined the
content of each, until I hit IDAT. IDAT is at 0x5D on one image,
and on the other the IDAT is after the lookup table and is at 0x331.
One thing about PNG as a format, is output routines like to try a number
of formats for storage, compare the file size and keep the smallest one.
This notion originated with a piece of software used to reduce PNGs
so they could be served on the web. Not to be outdone, it would seem
some popular library has also taken it upon themselves to do a
version of that reductionism. The difference between them, is the original
concept of PNG reduction, did an inordinate number of versions, and had a long
run time (nobody cared, since this was for a web server and the effort
would "pay for itself"). The library version, who can say how many it
has tried, before picking one.
If you switch to some other image family (someone mentioned TIF), perhaps
the library that handles those, will "stick to the theme you selected"
and not mess around like PNG does. JPEG would not be a good choice, because
of the rounding errors in the colour space (good conversion routines can
rationalize the colour space and return it to normal, but with your
luck so far, this doesn't sound like a good idea :-) ).
Maybe BMP would work, but I don't know enough about the
innards there to comment.
*******
In GIMP, Image : Mode : Grayscale to start.
Then Colours : Threshold and move the slider for a more pleasing result.
This will irritate the hell out of the panorama software though.
Using the threshold, I can keep the text, with only a bit of
noise showing through. There won't be much of anything for the
panorama software to latch onto, but at least the result will be clean.
[Picture]
https://i.postimg.cc/8zx654Wg/threshold.gif
Maybe there's a better adaptive filter out there, to
pull signal out of noise. As using Threshold "chews holes"
in the writing which is not good for overall result.
Looking at the image, it almost looks like something
where a different colour of illumination (UV?) might
pick out the writing better. The "ink" looks different
to my eye than the noise in the image.
Maybe something that recognizes hand writing could
fix up the quality of the scan.
Paul