Welcome, Guest. Please login or register.

Author Topic: Writing to an Image  (Read 933 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline PrincipherTopic starter

  • Newbie
  • *
  • Join Date: Dec 2005
  • Posts: 10
    • Show only replies by Principher
Writing to an Image
« 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
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Writing to an Image
« Reply #1 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. :-)

Offline PrincipherTopic starter

  • Newbie
  • *
  • Join Date: Dec 2005
  • Posts: 10
    • Show only replies by Principher
Re: Writing to an Image
« Reply #2 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.