If you are too impatient to wait for version 1.4 there is a way using e.g. Perl on a Mac or a PC with Linux or even Windows…
The script below will accept an image as parameter and create the Lua code that will populate an image that you can use for your sprite.
You need to install Image::Magick.
Once you get the Lua code you can transfer it to your iPad using e-mail, SkyDrive whatever and do a copy-paste to Codea.
Quite brute-force and not optimized (all pixels are R,G,B) but worked for me with images up to 100x100 - although Codea does not like much big buffers and would crash on me once in a while
#!/usr/bin/perl
#
# Read an image and generate a file with the content
# of each pixels as 1 LUA tables Red Green Blue
use Image::Magick;
$image = Image::Magick->new;
$input_file_name = $ARGV[0];
$image->Read($input_file_name) ;
$input_file_name =~ m/^(.*)\\./;
$file_name_base = $1;
$height = $image->Get('rows');
$width = $image->Get('columns');
@pixels = $image->GetPixels(map=>'RGB', height=>$height, width=>$width, normalize=>true);
$pixels_nr = 0;
@txt = "-- Lua array \
";
push @txt, "$file_name_base","Rgb = { ";
foreach my $pixel_color (@pixels) {
push @txt, int($pixel_color*256), ",";
$pixels_nr += 1;
if ( ($pixels_nr % 20) == 0 ) { push @txt, "\
"; }
}
push @txt, " } \
";
push @txt, "$file_name_base","PixelsNr = ", int($pixels_nr/3), "\
";
push @txt, "$file_name_base","Width = ", $width, "\
";
push @txt, "$file_name_base","Height = ", $height, "\
\
";
push @txt, "$file_name_base","Image = image($file_name_base","Width,$file_name_base","Height)\
";
push @txt, "for y=0,$file_name_base","Height-1 do\
";
push @txt, " for x=0,$file_name_base","Width-1 do\
";
push @txt, " r = $file_name_base","Rgb[(3*x)+(y*$file_name_base","Width*3)+1]\
";
push @txt, " v = $file_name_base","Rgb[(3*x)+1+(y*$file_name_base","Width*3)+1]\
";
push @txt, " b = $file_name_base","Rgb[(3*x)+2+(y*$file_name_base","Width*3)+1]\
";
push @txt, " if r == 256 and v == 256 and b == 256 then \
";
push @txt, " $file_name_base","Image:set(x,y,0,0,0,0)\
";
push @txt, " else\
";
push @txt, " $file_name_base","Image:set(x,y,r*0.98,v*0.98,b*0.98,255)\
";
push @txt, " end\
";
push @txt, " end\
";
push @txt, "end\
\
";
print @txt