View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001958||Lazarus||-||public||2006-04-02 04:05||2014-10-01 17:16|
|Reporter||Assigned To||yang jixian|
|Product Version||0.9.15 (SVN)|
|Summary||0001958: TBitmap and Scanline simulation|
|Description||I have created many base image procesing functions using fast scanline method in Delphi. Now it is a problem to fast translate all the code to Lazarus, unless translation for TLazIntfImage doens't be finished. I also dobut of speed performance using TLazIntfImage. |
It would be useful at least to allow simulation of scanline functionality in order to keep Delphi compatibility.
For example, a very fast 90 degree 32-bits rotation with Delphi code:
procedure SZRotateBmp90(Src, Dest: TBitmap);
x, y : integer;
dY : array of PDWORD; // Array for destination scanline
sH, dH: integer; // Height variables
P : PDWORD; // Source pointer
if Src.PixelFormat<> pf32bit then
Src.PixelFormat := pf32bit;
if Dest.PixelFormat<> pf32bit then
Dest.PixelFormat := pf32bit;
Dest.Width := Src.Height;
Dest.Height := Src.Width;
// Initialize dynamic array
// Save pointers to array for acceleration
for y := 0 to dH do
DY[y] := Dest.ScanLine[y];
// Copy Src horizontal lines to be Dest vertical by +90 degree
for y := 0 to sH do
for x := dH downto 0 do
|Tags||No tags attached.|
|Fixed in Revision|
|Over 2 years open and assigned. Is there any information of availability of this possibility? What exact problems are to "simulate" scanline?|
||Maybe we should set it to acknowledge and un-assign the issue, then it can be open for another 2-3 years. :-)|
Last edited: 2011-01-19 12:27
Perhaps is better to close it as an "unreal" request and force all to use "The Lazarus way"...
Perhaps it is for a forum discussion, but in general, Lazarus have very slow development rate lately. Usually only lot of bug fixes, but releasing 1.0.0 seems far away from 3-5 years... How actually graph of active number of developers working on Lazarus comparing by years looking now? And the same on all platforms claims they are and will be covered?
Actually, in general I have strong impression interest for Lazarus and FPC (including Delphi and Pascal respectively) rapidly drops. Despite I'm senior Delphi programmer and mainly spent all my profession life programming in Pascal, I just only regret the situation is, thus time for Pascal passed long time ago...
||Yes, this is more for a forum discussion.|
|Suggestion is still active - you can freely close the issue.|
||Maybe when FPC 2.6 is released with support for class helpers ;-)|
|Interesting, Flavio. Can you be more specific about "initiative" (links, discussions)?|
As I'm the one who is implementing class helpers: Do you have any specific ideas or examples regarding this issue? I'd like to test them with my current (unfinished) implementation.
Sasa: rotation based on simple coordinate inversion is not fast. A 4x speed up is easily possible, see
maybe even more for 32-bit.
Moreover, the number of bytes to jump from (x,y) to (x,y+1) is always constant in bitmaps (but can be negative). This value can be determined by subtracting scanline and scanline. Using this eliminates the need for the array. (see also the URL above. The rowpitch value is ptrint(scanline)-ptrint(scanline)
Under Delphi I use the following image class (generic):
http://www.stack.nl/~marcov/baseimagegen.pas which is fully detached from the GUI.
||I prefer scanline too.|
Last edited: 2011-04-18 18:28
@Marco van de Voort
At windows and delphi I notice no significant difference moving by fixed pointer or indexed, also for specific task it requite no SSE and prefer no additional memory to store results for faster execution. Sample I gave is a compromise between speed and code simplicity.
Waiting to see results. Thanks.
This also looks quite promising - BGRABitmap library:
The DLBitmap.pas contains TDLBitmap which has a scanline property.
seems to indicate TBitMap has a scanline property.
Is this true? Can this issue be closed?
I tested with trunk on Qt. ScanLine is here and works.
It has to be used like this:
//do some ScanLine job
IMO, this can be resolved.
Thanks for testing, Vojtech!
@reporter: Fixed in meantime. Please close if ok or reopen if not. Thank you
|2006-04-02 06:10||Vincent Snijders||Target||=> post 1.0|
|2006-04-02 06:10||Vincent Snijders||Status||new => acknowledged|
|2008-09-16 15:09||Vincent Snijders||Status||acknowledged => assigned|
|2008-09-16 15:09||Vincent Snijders||Assigned To||=> Marc Weustink|
|2008-09-16 16:17||Vincent Snijders||Relationship added||has duplicate 0009954|
||Note Added: 0045299|
|2011-01-19 11:13||Vincent Snijders||Note Added: 0045301|
||Note Added: 0045303|
||Note Edited: 0045303|
|2011-01-19 12:46||Vincent Snijders||Note Added: 0045304|
||Note Added: 0045305|
|2011-01-21 08:37||Flávio Etrusco||Note Added: 0045358|
||Note Added: 0045390|
|2011-01-22 10:51||Sven Barth||Note Added: 0045394|
|2011-03-23 11:07||Marco van de Voort||Note Added: 0046765|
|2011-03-23 11:08||Marco van de Voort||Note Edited: 0046765|
|2011-03-23 11:17||Marco van de Voort||Note Edited: 0046765|
|2011-03-23 11:20||Marco van de Voort||Note Edited: 0046765|
|2011-03-28 10:27||yang jixian||Assigned To||Marc Weustink => yang jixian|
|2011-03-28 10:32||yang jixian||Note Added: 0046882|
||Note Added: 0047572|
||Note Edited: 0047572|
||Note Edited: 0047572|
|2011-04-19 16:48||yang jixian||Note Added: 0047610|
|2012-02-04 12:03||Zeljan Rikalo||LazTarget||post 1.0 => 1.2|
|2012-05-19 01:24||Juha Manninen||Relationship added||related to 0021764|
|2014-01-14 15:16||Martin Friebe||LazTarget||1.2 => 1.4|
|2014-09-10 01:02||Juha Manninen||LazTarget||1.4 => -|
||Note Added: 0077837|
|2014-10-01 13:38||Vojtech Cihak||Note Added: 0077846|
||Note Added: 0077856|
||Status||assigned => resolved|
||Resolution||open => fixed|