Jump to content

Tommi Prami

  • Content Count

  • Joined

  • Last visited

  • Days Won


Tommi Prami last won the day on April 21 2020

Tommi Prami had the most liked content!

Community Reputation

45 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for all info, suggestions and mainly sceptics so far ๐Ÿ™‚ -Tee-
  2. 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.
  3. 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.
  4. Like I said earlier, part of 3rd party library/Component and can't be changed. -Tee-
  5. 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.
  6. 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.
  7. Yes, it is saved to file...
  8. 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 ๐Ÿ™‚
  9. Thanks, I'll have a look...
  10. Customer had bigger than 5000x3000, which is way way too big, but that just brought this piece of code into my attention..
  11. 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-
  12. 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.
  13. Would that still be 4 bytes? Right? Ah, should learn how to read first ๐Ÿ™‚
  14. On large bitmap this takes minutes so I am pretty sure this is the place all speedups are welcome,
  15. 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-