Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Principher on December 23, 2005, 06:43:23 PM

Title: Writing to an Image
Post by: Principher on December 23, 2005, 06:43:23 PM
I have decided to try to learn programming for my Amiga 1200. Currently I have started with ECS graphics programming.

However I have a problem. I grew up with VGA chunky graphics and not the Amiga's planar graphics and as such I have have a bit of a hard time figuring out how to write a pixel to an image. Ofcourse I could just use WritePixel, but since this is a function and not a macro it is way too slow for writing lots of pixels. Can someone explain how to write a pixel at location (x,y) in a NxM image with D bitplanes in a way so that I can construct a macro for the job?

I have tried searching google for help, but have not been able of finding the right combinations of words :(

Thanks in advance
Principher
Title: Re: Writing to an Image
Post by: bloodline on December 23, 2005, 06:59:45 PM
It's quite tedious as you have to set the corresponding bit in each bitplane (actually it's quite easy in asm). Just use write pixelarray(), or use one of the hundreds of C2P routines on the internet. :-)
Title: Re: Writing to an Image
Post by: Principher on December 23, 2005, 07:05:58 PM
Thanks, I will look into those two options. Didn't think of the possibility of there being a chunky to planer converter function.