Hello,
Lately, I'm generating thousands of BMP files.
It seems that there was some attempt to make a primitive for it, but the one in the VMMaker doesn't seem to be complete and the primitive only handles depth=32 Forms, which doesn't serve my purpose because the BMP I'm interested in happens to be 8 bit.
So, I did a little hack to speed up the BMP writing. With this changeset, writing a 720x480x8 Form to a byte array as BMP becomes 30 times faster.
----------------- f _ Form extent: 720@480 depth: 8. bytes _ ByteArray new: 500000. [100 timesRepeat: [ w _ WriteStream on: bytes. b _ BMPReadWriter on: w. b nextPutImage: f. ]] timeToRun. -----------------
This changeset factors out the depth=32 case. Presumably, it should make it easier to adapt the BMP writing primitive.
-- Yoshiki
On Feb 18, 2004, at 6:40 PM, Yoshiki Ohshima wrote:
Hello,
Lately, I'm generating thousands of BMP files.
It seems that there was some attempt to make a primitive for it, but the one in the VMMaker doesn't seem to be complete and the primitive only handles depth=32 Forms, which doesn't serve my purpose because the BMP I'm interested in happens to be 8 bit.
If anyone cares to expand the plugin capabilities we can add the code quite quickly. Eddie Cottongim did the writer prim a while back.
tim
can some of the images/forms guys have a look at that and gives an advice. This would be good to have that in 3.7
ducasse@iam.unibe.ch wrote:
can some of the images/forms guys have a look at that and gives an advice. This would be good to have that in 3.7
Have you looked at the size of a .bmp file reciently?
Hello,
can some of the images/forms guys have a look at that and gives an advice. This would be good to have that in 3.7
Have you looked at the size of a .bmp file reciently?
What do you mean by that? Isn't a bmp file the same old bmp file, is it?
-- Yoshiki
On Thursday 25 March 2004 1:36 pm, Yoshiki Ohshima wrote:
Have you looked at the size of a .bmp file reciently?
What do you mean by that? Isn't a bmp file the same old bmp file, is it?
Sure, but there are few reasons any more to use one instead of (say) a PNG or GIF.
Hello,
On Thursday 25 March 2004 1:36 pm, Yoshiki Ohshima wrote:
Have you looked at the size of a .bmp file reciently?
What do you mean by that? Isn't a bmp file the same old bmp file, is it?
Sure, but there are few reasons any more to use one instead of (say) a PNG or GIF.
Ah, that is what you guys mean. I don't mind personally that this change doesn't go to the main image. But, isn't it nice if a *part* of the system runs 30 times faster without writing new primitives and (presumably) not breaking the other parts of system?
-- Yoshiki
squeak-dev@lists.squeakfoundation.org