BBC BASIC for Windows
« Reading and Writing Screen Pixels »
Welcome Guest. Please Login or Register. Apr 6th, 2018, 12:25am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Could you give me one line of code showing addressing of data indexed by pointer?
Sorry, I can't, because I don't know the format of your bitmap.
In general terms you will need to calculate the offset into the bitmap from your x and y coordinates, add that offset to the base address (bits% in the case of the code you listed), then read the pixel data from memory and separate it into its RGB components (assuming you have selected a colour format rather than monochrome).
But the detailed code will depend on your bitmap's format and dimensions (for example that will determine whether you need to pad each line to an exact multiple of DWORDs).