Jump to content
Sign in to follow this  
Tommi Prami

32bit RGBA TBitmap to RGB byte stream.

Recommended Posts

29 minutes ago, Tommi Prami said:

Stream of bytes in order of RGB. What happens after this is another story all together.

As you like. There are other existing solutions to convert RGBA to RGB depending on which file format you want to create. An RGB stream copied to a file can't do much. The reader cannot even know the width and height.

Share this post


Link to post
12 minutes ago, FPiette said:

As you like. There are other existing solutions to convert RGBA to RGB depending on which file format you want to create. An RGB stream copied to a file can't do much. The reader cannot even know the width and height.

Like I said earlier, part of 3rd party library/Component and can't be changed.

 

-Tee-

Share this post


Link to post
18 minutes ago, Tommi Prami said:

Like I said earlier, part of 3rd party library/Component and can't be changed.

That has no sense: you ask to change the way to convert from RGBA to RGB, so you can change that part.

Sorry but I won't participate any more in this useless conversation about an XY problem.

Share this post


Link to post
39 minutes ago, FPiette said:

That has no sense: you ask to change the way to convert from RGBA to RGB, so you can change that part.

Sorry but I won't participate any more in this useless conversation about an XY problem.

Hmm, I think this is lost in translation or something like that.

Process is and willöbe 100% same, I am not asking help to change process, just optimize what there already is. As far as I know it can't be even changed changed. I am just looking a way to optimize it. Have received valuable info, so I thank all for that.

Method input is TBitmap with 32bit "pixel format" and pixels in it has to be saved into stream with 3bytes per pixel in order of RGB. Sorry if I am not clear enough.

 

Edited by Tommi Prami

Share this post


Link to post

Intermediate info:

It is way faster than I thought. I got bit (very badly) by FastMM4 full debug mode. It takes ages to do that memory allocation Scanline does. So there is room for optimizing the extra scanlines out, and maybe some other stuff also.

So not too much user preservable room for optimization there is it first seems. Still can make it faster tough. I have some kind of test project cooking, trying to check how far I can push it. I'll publish it later if I got something out of it.

Share this post


Link to post

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
Sign in to follow this  

×