Syntactic Confectionery Delight | |
PerlMonks |
BMP file manipulationby Anonymous Monk |
on Dec 17, 2003 at 05:44 UTC ( [id://315223]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Greetings, My question isn't so much a perl question as a programming/logic question, but since I'm doing it in perl, might as well post it here. I have a .bmp picture file in memory stored as a scalar ($picture) with a size of $picx by $picy. I want to take a subset of this picture starting at $startx,$starty and going through $endx,$endy. The .bmp file foremat can be found here. The most relevant information is at the bottom. For those of you who don't feel like reading, basically, the picture is stored upside down. Left to right order of each line of the picture is as you would expect, but it starts with the bottom line of the picture first. I need to keep the data of the subset in the right order, so that I can redisplay the smaller picture, and I have been mangling this code every which way with no success. I know that this can be done with perlmagick, but I'm going to have to be doing this 1-2 times a second, and from what I can tell, PerlMagick has to read the bmp from a file, so I'd have to write the file from memoryto disk, and then read it back into a perlmagick structure before I could do anything. Thanks for your time! -John
Back to
Seekers of Perl Wisdom
|
|