Woo done it :D
This works exactly how I wanted it to:)
#! /usr/local/bin/perl
use GD;
print "Opening image\n";
$image = newFromJpeg GD::Image('image.jpg') || die "Unable to open image\n";
print "Starting pixel modification\n";
my %data= ();
foreach my $w (0..200) {
foreach my $h (0..200) {...
Actually I got the xor thing mixed up :x
The only one that needs to be done is the red value of each pixel needs to be set equal to the blue value xor 255.
Wow thanks kevin, that code will help me a lot! :).
I will do some thinking and try and work out how to 'make the blue and green values of each pixel equal to the red value Xor'd with 255'.
#! /usr/local/bin/perl
use GD;
$image = newFromJpeg GD::Image('image.jpg') || die "Unable to open...
Hm, thanks I understand what you mean with the grid and 3 bytes per pixel :)
I have opened my image now using GD like this:
$myImage = newFromJpeg GD::Image('image.jpg') || die "Unable to open image\n";
you say that I have to decompress the image and strip the header info... does GD do this...
hmm im trying to install it like you said with ppm but it says that it 'is not intended for this build of perl MSWin32-x86-multi-thread' ... I have the latest version of activestate perl installed too :S
Hi,
can anyone recommend a module for me to use which will allow me to itterate through each pixel of an image and modify the R,G,B data for each pixel?
I really don't know how to do this but it is an important part of my program which I have almost finished except for this last bit.
I have...
Hi, please could someone hep me with this.. I have the following code:
http://www.rafb.net/paste/results/EVa25S14.html
and it gets the webpage fine, but I packet sniffed it and it isn't sending the referer header. I have tried for a long time to get this working, does anyone know what is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.