Jump to content

Writing a bitmap file from array data?


 Share

Recommended Posts

Short version, can it be done? In theory it should be simple enough, open a file, write a header, then dump each pixel data in succession... headers are probably going to give me trouble more than anything, but is the overall idea solid? I'm trying to write a script for making large screenshots, and while this approach might be a little primitive... screw it, whatever works, right?

Link to comment
Share on other sites

Hm, what would be the bottleneck, the write speed?

The everything-speed :graduated: AutoIt is interpreted, and it's array performance is fairly good as such, but is not nearly ideal for image processing. And a decent screenshot would require a rather large array. Not saying it can be done, but it will suffer from execution performance. AutoIt is not an image processing language.

Edited by Unsigned

.

Link to comment
Share on other sites

Only if the data has to be dumped in a single go - I could probably define a mid-sized array, write the data once it's filled, then repeat until done. It would be a bit of a balancing act between array size versus performance, though, but that should be tweakable easily enough.

Link to comment
Share on other sites

It's not so much the array size either, but loop performance. But hey, you don't have to take my word for it, go ahead and give it a shot :graduated: Nothing like learning from experience. All the same, if I absolutely had to do image processing in AutoIt, I'd rip out a DLL or plugin to do the heavy lifting.

.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...