Building an image one pixel at a time

All,

Is it possible to build an image one pixel at a time, e.g. to have a data
structure that looks like this:

$i{channel}[x][y]

.... where channel is r,g,b, or a, and x and y are the pixel coordinates.
Then, once I have the data filled out, call some module and write out a .png
file?

- Bryan



--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Bryan R Harris [ Mi, 30 März 2011 17:36 ] [ ID #2057373 ]

Re: Building an image one pixel at a time

On 11-03-30 11:36 AM, Bryan R Harris wrote:
>
>
> All,
>
> Is it possible to build an image one pixel at a time, e.g. to have a data
> structure that looks like this:
>
> $i{channel}[x][y]
>
> ... where channel is r,g,b, or a, and x and y are the pixel coordinates.
> Then, once I have the data filled out, call some module and write out a .png
> file?
>
> - Bryan

My Vulcan mind-reading is not working today. Could you please include
some code?


--
Just my 0.00000002 million dollars worth,
Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software: Fail early & often.

Eliminate software piracy: use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Shawn H Corey [ Mi, 30 März 2011 17:54 ] [ ID #2057375 ]

Re: Building an image one pixel at a time

> On 11-03-30 11:36 AM, Bryan R Harris wrote:
>>
>>
>> All,
>>
>> Is it possible to build an image one pixel at a time, e.g. to have a data
>> structure that looks like this:
>>
>> $i{channel}[x][y]
>>
>> ... where channel is r,g,b, or a, and x and y are the pixel coordinates.
>> Then, once I have the data filled out, call some module and write out a .png
>> file?
>>
>> - Bryan
>
> My Vulcan mind-reading is not working today. Could you please include
> some code?


I don't have any yet. I was just wondering if there was a module that would
write out .png files reliably...

- Bryan




--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Bryan R Harris [ Mi, 30 März 2011 21:29 ] [ ID #2057378 ]

Re: Building an image one pixel at a time

On 11-03-30 03:29 PM, Bryan R Harris wrote:
> I don't have any yet. I was just wondering if there was a module that would
> write out .png files reliably...

There's a number of them. Try GD to start.

http://search.cpan.org/~lds/GD-2.45/GD.pm


--
Just my 0.00000002 million dollars worth,
Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software: Fail early & often.

Eliminate software piracy: use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Shawn H Corey [ Mi, 30 März 2011 21:37 ] [ ID #2057379 ]
Perl » gmane.comp.lang.perl.beginners » Building an image one pixel at a time

Vorheriges Thema: Programmatically check for syntax errors without compiling the code
Nächstes Thema: How to not hard code <STDIN>?