Hi,
I have a question about the xform function please. In the attached example, I have a png image of 100 * 100 pixels (created in GIMP), that I am displaying on screen using the xform function with a scaling of 7. However, rather than displaying an image of 700 * 700 pixels, the image dimensions would appear to be 693 * 693 pixels? I have tried this with image files created in different applications, with the same results.
Am I maybe using the xform function incorrectly, or is there a very small issue with it? This is such a small problem that I was unsure whether to raise it, and I can work around it in my routines, so please do not rush to respond.
02-19-2025, 01:32 PM (This post was last modified: 02-19-2025, 02:09 PM by Marcus.)
How odd, I'll investigate it!
Edit I just had a quick look at the n7 source code on my phone, while walking home from work, and found the cause. I'll release an update when I get home
02-19-2025, 01:34 PM (This post was last modified: 02-19-2025, 01:59 PM by 1micha.elok.)
sorry, I deleted a reply... I still make an error
(02-19-2025, 10:40 AM)kevin Wrote: Hi,
I have a question about the xform function please. In the attached example, I have a png image of 100 * 100 pixels (created in GIMP), that I am displaying on screen using the xform function with a scaling of 7. However, rather than displaying an image of 700 * 700 pixels, the image dimensions would appear to be 693 * 693 pixels? I have tried this with image files created in different applications, with the same results.
...
02-19-2025, 02:47 PM (This post was last modified: Yesterday, 06:08 AM by Marcus.)
(02-19-2025, 01:34 PM)1micha.elok Wrote: sorry, I deleted a reply... I still make an error
(02-19-2025, 10:40 AM)kevin Wrote: Hi,
I have a question about the xform function please. In the attached example, I have a png image of 100 * 100 pixels (created in GIMP), that I am displaying on screen using the xform function with a scaling of 7. However, rather than displaying an image of 700 * 700 pixels, the image dimensions would appear to be 693 * 693 pixels? I have tried this with image files created in different applications, with the same results.
...
It's all my bad, there's an error in the calculations in the 'draw image xform' implementation (C code). Simply put, the implementation subtracts 1 from the width and height of the image before applying the transformations, so when scaling by 7, 7 pixels goes missing. Sorry, I don't know how that bug got there, I must have left some test in the code by mistake.