Recent

Author Topic: need fast access to jBitmap byte array of pixels using ScanLine  (Read 1547 times)

neuro

  • Jr. Member
  • **
  • Posts: 62
I need fast access to jBitmap byte array of pixels (reading and writing) using ScanLine or similar procedure.
The only way which I have found to access image pixels –> jCanvas has
Code: Pascal  [Select][+][-]
  1. procedure DrawPoint(_x1: single; _y1: single);
which is very slow.

In file “Laz_And_Controls.pas” I have found that jBitmap has ScanPixel procedure which however is not implemented yet.
Code: Pascal  [Select][+][-]
  1. procedure ScanPixel(PBytePixel: PScanByte; notByteIndex: integer); overload; //TODO - just draft
  2. procedure ScanPixel(PDWordPixel: PScanLine); overload; //TODO - just draft

My question: how to get fast access to jBitmap byte array of pixels using ScanLine or similar procedure?

neuro

  • Jr. Member
  • **
  • Posts: 62
Re: need fast access to jBitmap byte array of pixels using ScanLine
« Reply #1 on: March 10, 2022, 01:28:43 am »
I have solved the problem of fast access to jBitmap pixels using BGRABitmap.
Please read:
https://forum.lazarus.freepascal.org/index.php/topic,58624.0.html
BGRABitmap for Android demo provides fast pixel access for jBitmap

It contains attachment "AppBGRABitmapDemo1.zip".

 

TinyPortal © 2005-2018