-
Content Count
597 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tommi Prami
-
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I'll check those later. Thanks. -Tee- -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
That is not complete story tough. Production APP about : 128641ms Running test: "Reference" (RELEASE build) Run count: 5 Min: 113,458ms, Average: 118,925ms, Max: 127,638ms Running test: "Reference" (DEBUG build) Run count: 5 Min: 13489,222ms, Average: 13957,058ms, Max: 14276,866ms While debug mode is slow, but not even close as slow what I experienced when that piece of code is part of the whole program (Not isolated small piece of code in separate ap). Because it took minutes to complete. (Yes I measured it). What in earth could cause that. Memory alignment? Somehow the bitmap is differently in memory (bad alignment etc?). One obvious could be Compiler options, have to check those later. -Tee- -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Thanks for all info, suggestions and mainly sceptics so far π -Tee- -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
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. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
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. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Like I said earlier, part of 3rd party library/Component and can't be changed. -Tee- -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I think this is pretty clear in the Caption or I at least think it is pretty self explanatory. Stream of bytes in order of RGB. What happens after this is another story all together. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Should always study the code one is calling π I've always thought that it would just return pointer to the data and offset that. depending the line you access. Good to learn new things. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Yes, it is saved to file... -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Not huge, but large, but this is for 7x3cm logo on the print so overkill for that. But that makes this piece of code even worse π -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Thanks, I'll have a look... -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Customer had bigger than 5000x3000, which is way way too big, but that just brought this piece of code into my attention.. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Thanks everyone, so far. I'll have to check on this later. I'll stress that this is part of 3rd party component, which we can't totally rewrite, this process takes too much time sometimes so if we can speed up it a bit if just can. I was pondering that if I could define 4byte array and use Absolute trick to map that array to the result of method shown by the Anders above. I am still pretty much in a sleep, so all ideas I get how to implement this seems that it would have too much code in it. I bet there is elegant solution, possibly using pointers which I am not too good at. But have to try later. -Tee- -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Input is as in normally in TBitmap with 32 bit pixels. TRGB32 = packed record B, G, R, A: Byte; end; and output should be stream of RGB-bytes in that order. .tee. -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Would that still be 4 bytes? Right? Ah, should learn how to read first π -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
On large bitmap this takes minutes so I am pretty sure this is the place all speedups are welcome, -
32bit RGBA TBitmap to RGB byte stream.
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
One that could significantly make this faster would be to use some fast but good enough quality Algorithm to resample the image smaller first. Might be possible to do that, or not, depending how large change it would be an sure would have to be super fast resampling. But if possible with put changing the original bitmap, would be cool. -Tee- -
Where to report bugs or feature requests? Or how to make pull request?
Tommi Prami posted a topic in GExperts
Fast search did not give me any help for this. Is this OK place for feature requests/ bugs or is there better place? -Tee- PS. Oh, seems to be SourceForge, maybe? Which is not super nice, but It'll do if that is preferred place π -
Where to report bugs or feature requests? Or how to make pull request?
Tommi Prami replied to Tommi Prami's topic in GExperts
Mainly because SVN doesn't support pull requequests. Make s harder to make an batch (possible but not that automated I think) -
I asked this long time ago, but still can't see the point why it is better to lock down the messages. Own messages from editing. Most of the time, I at least, write message, and might come back to check it days later, if not super urgent question. and it is very annoying to see some typo or ununderstandable (is it a word) sentence. And then can't fix it. Most major Social media platforms do not disable editing , and this is only forum I've ever used which disables editing. -Tee-
-
ANN: Parnassus Parallel Debugger
Tommi Prami replied to Dave Millington (personal)'s topic in Delphi Third-Party
Not true, in my experience, most of the time it'll pause in RTL code etc or outside of the scope (windows maybe dunno), and while stepping for ages you are sill somewhere at "unknown areas". I've never been so lucky with pausing that it'll pause in easy place to step through. Maybe this plugin will help a ton because you see them in parallel. Have not tested threading part of it yet. -
"natural" compare function for sort
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Thanks. That API works if one is using Windows, as we are. If someone has code for this, pleace share, I think would be usable for others tool. -Tee- -
"natural" compare function for sort
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
This -> https://en.wikipedia.org/wiki/Natural_sort_order -
"natural" compare function for sort
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Sorry bad example. Edited the list a bit. Not just alphabetically but numbers would always be Smaller or larger first (depending if Ascending or Descending sort). Can't remeber which this was called. Maybe natural sort etc.,., -
ANN: Parnassus Parallel Debugger
Tommi Prami replied to Dave Millington (personal)'s topic in Delphi Third-Party
Not most likely possible to implement for this plugin, but "Run until project code is reached" would be super cool. Multithreaded app is munching a way, maybe looping for ever, but don't have clue where. One could pause app, and Run until project code is reached (Or Sun until code open in IDE is reached (Named/in any thread). Don't even know would this be possible for debugger to do, but it would be super cool. It is very hard to track down where the app is spending it's time, when it does it in a place you did not expect it to be. Just throwing the idea out there, maybe it is possible or even easy to implement, dunno... -Tee-