Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: BMP file manipulationby tachyon (Chancellor) |
on Dec 17, 2003 at 07:10 UTC ( [id://315232]=note: print w/replies, xml ) | Need Help?? |
Do it with a C program if you want some good advice, even if you have to write to disk. However you can of course do it in Perl, but it is not for the faint of heart. Essentially you need to:
Here is some code to get you started. This gets the header, modifies just the height (easy :-) modifies the header and writes the file out again. I leave the data alone but as you can see you just see half the bitmap now so the rest of the pixel data could have been thrown away. Modifying the width is where it gets harder.
cheers tachyon
In Section
Seekers of Perl Wisdom
|
|